/*
 * select_type：
 * 1：学生基本情况
 * 2：办学条件
 * 3：专业与课程建设
 * 4：参与职教集团情况
 * 5：国际合作
 * 6：校企合作
 * 7：教师基本情况
 * 8：公共课教师情况
 * 9：专业大类教师情况
 * 10：职业培训情况
 * 11：全校实训基地
 * 12：专业大类实训基地
 * 13：公用实训基地
 * 14：教学计划基本情况
 * 15：项目申报
 *
 * req_type：
 * 1：全部请求
 * 2：已通过请求
 * 3：已驳回请求
 * 4：未处理请求
 */
var select_type = 1;
var req_type = 1;
var pageSize = 7;


// 选择切换框按钮改变CSS
function select(ele) {
    var li = $(ele).parent();
    //	alert(li.val());
    li.attr("class", "active");
    $(ele).css("color", "#EF7178");
    $(ele).css("border-bottom-color", "#EF7178");
    var other_li = li.siblings('li');
    other_li.each(function (i, element) {
        $(this).removeClass("active");
        $(this).children().eq(0).css("color", "grey");
        $(this).children().eq(0).css("border-bottom-color", "");
    })

    // 项目管理事件
    var projectType = $(ele).attr('data-project-type');
    switch (projectType) {
        case "1" :
            $('#pagination').jqPaginator('option', {
                totalCounts: 1,
                currentPage: 1,
                onPageChange: function (page_index, type) {
                    getProjectManagement(page_index - 1, "1");
                }
            });
            getProjectManagement(0, "1");
            break;
        case "2" :
            $('#pagination').jqPaginator('option', {
                totalCounts: 1,
                currentPage: 1,
                onPageChange: function (page_index, type) {
                    getProjectManagement(page_index - 1, "2");
                }
            });
            getProjectManagement(0, "2");
            break;
        case "3" :
            $('#pagination').jqPaginator('option', {
                totalCounts: 1,
                currentPage: 1,
                onPageChange: function (page_index, type) {
                    getProjectManagement(page_index - 1, "3");
                }
            });
            getProjectManagement(0, "3");
            break;
        case "4" :
            $('#pagination').jqPaginator('option', {
                totalCounts: 1,
                currentPage: 1,
                onPageChange: function (page_index, type) {
                    getProjectManagement(page_index - 1, "4");
                }
            });
            getProjectManagement(0, "4");
            break;
        default :
            break;
    }

    // 用户管理
    var userType = $(ele).attr('data-user-type');
    switch (userType) {
        case "1" :
            $('#pagination').jqPaginator('option', {
                totalCounts: 1,
                currentPage: 1,
                onPageChange: function (page_index, type) {
                    getSchoolUserInfor(page_index - 1);
                }
            });
            getSchoolUserInfor(0);
            break;
        case "2" :
            $('#pagination').jqPaginator('option', {
                totalCounts: 1,
                currentPage: 1,
                onPageChange: function (page_index, type) {
                    getCountyUserInfor(page_index - 1);
                }
            });
            getCountyUserInfor(0);
            break;
        case "3" :
            $('#pagination').jqPaginator('option', {
                totalCounts: 1,
                currentPage: 1,
                onPageChange: function (page_index, type) {
                    getCityUserInfor(page_index - 1);
                }
            });
            getCityUserInfor(0);
            break;
        case "4" :
            $('#pagination').jqPaginator('option', {
                totalCounts: 1,
                currentPage: 1,
                onPageChange: function (page_index, type) {
                    getLeaderUserInfor(page_index - 1);
                }
            });
            getLeaderUserInfor(0);
            break;
        default :
            break;
    }

    var noticeUserType = $(ele).attr('data-notice-user-type');
    // alert(noticeUserType);
    switch (noticeUserType) {
        case "school" :
            $('#pagination').jqPaginator('option', {
                totalCounts: 1,
                currentPage: 1,
                onPageChange: function (page_index, type) {
                    getSchoolNoticeUser(page_index - 1);
                }
            });
            getSchoolNoticeUser(0);
            break;
        case "county" :
            $('#pagination').jqPaginator('option', {
                totalCounts: 1,
                currentPage: 1,
                onPageChange: function (page_index, type) {
                    getCountyNoticeUser(page_index - 1);
                }
            });
            getCountyNoticeUser(0);
            break;
        case "leader" :
            $('#pagination').jqPaginator('option', {
                totalCounts: 1,
                currentPage: 1,
                onPageChange: function (page_index, type) {
                    getLeaderNoticeUser(page_index - 1);
                }
            });
            getLeaderNoticeUser(0);
            break;
        default:
            break;
    }
}

function select_audit_type() {
    var type = $("#audit_type option:selected").text();
    if (type == "学生基本情况") {
        select_type = 1;
        getStudentBasicSituation();
    } else if (type == "办学条件") {
        select_type = 2;
        getSchoolCondition();
    } else if (type == "专业与课程建设") {
        select_type = 3;
        getMGCC();
    } else if (type == "参与职教集团情况") {
        select_type = 4;
        getVEG();
    } else if (type == "国际合作") {
        select_type = 5;
        getGlobalCooperation();
    } else if (type == "校企合作") {
        select_type = 6;
        getSCC();
    } else if (type == "教师基本情况") {
        select_type = 7;
        getTeacherBasicSituation();
    } else if (type == "公共课教师情况") {
        select_type = 8;
        getPCTS();
    } else if (type == "专业大类教师情况") {
        select_type = 9;
        getMTS();
    } else if (type == "职业培训情况") {
        select_type = 10;
        getVT();
    } else if (type == "全校实训基地") {
        select_type = 11;
        getWSTB();
    } else if (type == "专业大类实训基地") {
        select_type = 12;
        getMTB();
    } else if (type == "公用实训基地") {
        select_type = 13;
        getPTB();
    } else if (type == "教学计划基本情况") {
        select_type = 14;
        getTPBS();
    } else if (type == "项目申报") {
        select_type = 15;
        getProjectDeclare();
    }
}

//载入用户管理界面
function loadUserManage() {
    $('#content1').load('./user_manage.html');
    document.title = 'BEIS - 用户管理';
    // 菜单常亮
    $('#menu_1').attr("class", "dropdown");
    $('#menu_2').attr("class", "dropdown");
    $('#menu_3').attr("class", "dropdown active");
}

//载入项目管理界面
function loadProjectManage() {
    $('#content1').load('./project_manage.html');
    document.title = 'BEIS - 项目管理';
    // 菜单常亮
    $('#menu_1').attr("class", "dropdown");
    $('#menu_2').attr("class", "dropdown");
    $('#menu_3').attr("class", "dropdown active");
}

function initPMPage(totalElements) {
    // 初始化分页
    $('#pagination').jqPaginator({
        totalCounts: totalElements, // 总记录数
        pageSize: pageSize, // 每页显示记录数
        visiblePages: 10, // 显示页按钮数
        currentPage: 1, // 当前页码
        wrapper: "<ul></ul>",
        first: '<li class="first"><a href="javascript:void(0);">首页</a></li>',
        prev: '<li class="prev"><a href="javascript:void(0);">上一页</a></li>',
        next: '<li class="next"><a href="javascript:void(0);">下一页</a></li>',
        last: '<li class="last"><a href="javascript:void(0);">末页</a></li>',
        page: '<li class="page"><a href="javascript:void(0);">{{page}}</a></li>',
        onPageChange: function (page_index, type) {
            getProjectManagement(page_index - 1, "1");
        }
    });
}

// 载入发布公告界面
function loadAnnouncement() {
    $('#content1').load('./publish_announcement.html');
    document.title = 'BEIS - 公告管理';
    // 菜单常亮
    $('#menu_1').attr("class", "dropdown");
    $('#menu_2').attr("class", "dropdown");
    $('#menu_3').attr("class", "dropdown active");
}

// 载入开放填报界面
function loadOpenModify() {
    $('#content1').load('./open_modify.html');
    document.title = 'BEIS - 开放填报管理';
    // 菜单常亮
    $('#menu_1').attr("class", "dropdown");
    $('#menu_2').attr("class", "dropdown");
    $('#menu_3').attr("class", "dropdown active");
}

// 载入凭证管理界面
function loadCertificateManagement() {
    $('#content1').load('./certificate_management.html');
    document.title = 'BEIS - 凭证管理';
    // 菜单常亮
    $('#menu_1').attr("class", "dropdown");
    $('#menu_2').attr("class", "dropdown");
    $('#menu_3').attr("class", "dropdown active");
}

//载入搜索结果
function loadSearchResult() {
    $('#content1').load('./search_result.html');
    document.title = 'BEIS - 搜索结果';
    // 菜单常亮
    $('#menu_1').attr("class", "dropdown");
    $('#menu_2').attr("class", "dropdown");
    $('#menu_3').attr("class", "dropdown");

    // 显示查询结果
    var search_type = $('#search_type').val();
    var search_input = $('#search_input').val();
    if (search_type == '1') {
        // 基础数据
        if (search_input == "") {
            $('#alert-infor').text('查询输入为空');
            $('#alert-dialog').modal('show');
            setTimeout("$('#alert-dialog').modal('hide')", 2000);

        } else if ("学校基本信息".includes(search_input)) {
            // 查询学校基本信息
            $.ajax({
                type: 'GET',
                url: '/management/analysisdata/schoolbasicinfor',
                dataType: 'json',
                success: function (res) {
                    if (res.code == 200) {
                        $('#notice_list').empty();
                        var result_count = 0;
                        var search_result_html = "";
                        $.each(res.data, function (index, elt) {
                            search_result_html += "<div class='accordion-group'>" +
                                "<div class=''accordion-heading list' style='padding:1% 1% 1% 1%;text-align:left;'><div class='accordion-toggle collapsed' data-parent='#notice_list'	data-toggle='collapse' href='#pane_" + index + "'>" +
                                "<span style='width:50%;font-size:18px;'>" +
                                "<img class='img-circle' src='../img/psb.jpg' style='width:30px;height:30px;margin-right:1%'>" +
                                "<b>" + elt.schoolName + "</b><br>基础数据-学校基本信息</span>" +
                                "<span style='font-size:18px;'><a style='float:right;'>查看更多▼</a></span></div></div>" +
                                "<div class='accordion-body collapse' id='pane_" + index + "'style='height: 0px;'>" +
                                "<div class='accordion-inner' id='search_detail'>" +
                                "<table cellpadding='3' class='table table-striped' style='width:100%;'>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>学校名称</td>" +
                                "<td style='width:50%;text-align:right;'>" + elt.schoolName + "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>学校英文名称</td>" +
                                "<td style='width:50%;text-align:right;'>" + elt.schoolEnglishname + "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>学校所属行政部门</td>" +
                                "<td style='width:50%;text-align:right;'>" + elt.belongId + "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>校长姓名</td>" +
                                "<td style='width:50%;text-align:right;'>";
                            if (elt.principalName != undefined) {
                                search_result_html += elt.principalName + "</td></tr>";
                            }
                            search_result_html += "<tr style='width:100%'><td style='width:50%;text-align:left;'>校长联系方式</td>" +
                                "<td style='width:50%;text-align:right;'>";
                            if (elt.principalPhone != undefined) {
                                search_result_html += elt.principalPhone + "</td></tr>";
                            }
                            search_result_html += "<tr style='width:100%'><td style='width:50%;text-align:left;'>学校驻地类型</td>" +
                                "<td style='width:50%;text-align:right;'>";
                            if (elt.type != undefined) {
                                search_result_html += elt.type + "</td></tr>";
                            }
                            search_result_html += "</table></div></div></div>";
                            result_count++;
                        });
                        $('#result_count').text(result_count);
                        $('#notice_list').html(search_result_html);
                    } else {
                        alert(res.msg);
                        return;
                    }
                },
                error: function () {
                    alert('服务器异常');
                    return;
                }
            });

        } else if ("办学条件".includes(search_input)) {
            // 查询学校办学条件
            $.ajax({
                type: 'GET',
                url: '/management/analysisdata/schoolcondition',
                dataType: 'json',
                success: function (res) {
                    if (res.code == 200) {
                        var result_count = 0;

                        $('#notice_list').empty();
                        var html = "";

                        $.each(res.data, function (index, elt) {
                            html += "<div class='accordion-group'>" +
                                "<div class=''accordion-heading list' style='padding:1% 1% 1% 1%;text-align:left;'><div class='accordion-toggle collapsed' data-parent='#notice_list'	data-toggle='collapse' href='#pane_" + index + "'>" +
                                "<span style='width:50%;font-size:18px;'>" +
                                "<img class='img-circle' src='../img/psb.jpg' style='width:30px;height:30px;margin-right:1%'>" +
                                "<b id='search_result_school_name'>" + elt.schoolBasic.schoolName + "</b><br>基础数据-办学条件</span>" +
                                "<span style='font-size:18px;'><a style='float:right;'>查看更多▼</a></span></div></div>" +
                                "<div class='accordion-body collapse' id='pane_" + index + "'style='height: 0px;'>" +
                                "<div class='accordion-inner' id='search_detail'>" +
                                "<table cellpadding='3' class='table table-striped' style='width:100%;'>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>学生用餐座位数</td>" +
                                "<td style='width:50%;text-align:right;'>";
                            if (elt.diningSeatCount != undefined) html += elt.diningSeatCount;
                            html += "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>图书馆藏书数量</td>" +
                                "<td style='width:50%;text-align:right;'>";
                            if (elt.bookCount != undefined) html += elt.bookCount;
                            html += "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>电子读物数量</td>" +
                                "<td style='width:50%;text-align:right;'>";
                            if (elt.electronicBookCount != undefined) html += elt.electronicBookCount;
                            html += "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>报纸订阅数</td>" +
                                "<td style='width:50%;text-align:right;'>";
                            if (elt.newspaperSubscriptionCount != undefined) html += elt.newspaperSubscriptionCount;
                            html += "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>期刊订阅数</td>" +
                                "<td style='width:50%;text-align:right;'>";
                            if (elt.journalSubscriptionCount != undefined) html += elt.journalSubscriptionCount;
                            html += "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>阅览室座位数</td>" +
                                "<td style='width:50%;text-align:right;'>";
                            if (elt.readingroomSeatCount != undefined) html += elt.readingroomSeatCount;
                            html += "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>电子阅览室座位数</td>" +
                                "<td style='width:50%;text-align:right;'>";
                            if (elt.electronicReadingroomSeatCount != undefined) html += elt.electronicReadingroomSeatCount;
                            html += "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>教师用台式机数量</td>" +
                                "<td style='width:50%;text-align:right;'>";
                            if (elt.desktopCount != undefined) html += elt.desktopCount;
                            html += "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>教师用笔记本数量</td>" +
                                "<td style='width:50%;text-align:right;'>";
                            if (elt.notebookCount != undefined) html += elt.notebookCount;
                            html += "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>地方生均预算内拨款标准</td>" +
                                "<td style='width:50%;text-align:right;'>";
                            if (elt.localAverageBudgetaryAppropriation != undefined) html += elt.localAverageBudgetaryAppropriation;
                            html += "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>地方财政专项拨款</td>" +
                                "<td style='width:50%;text-align:right;'>";
                            if (elt.localFinancialSpecialAllocation != undefined) html += elt.localFinancialSpecialAllocation;
                            html += "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>负债总额</td>" +
                                "<td style='width:50%;text-align:right;'>";
                            if (elt.totalLiabilitie != undefined) html += elt.totalLiabilitie;
                            html += "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>货款总额</td>" +
                                "<td style='width:50%;text-align:right;'>";
                            if (elt.totalPayment != undefined) html += elt.totalPayment;
                            html += "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>教学仪器设备总值</td>" +
                                "<td style='width:50%;text-align:right;'>";
                            if (elt.educationalDeviceValue != undefined) html += elt.educationalDeviceValue;
                            html += "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>教学仪器设备总量</td>" +
                                "<td style='width:50%;text-align:right;'>";
                            if (elt.educationalDeviceCount != undefined) html += elt.educationalDeviceCount;
                            html += "</td></tr>" +
                                "</table></div></div></div>";
                            result_count++;
                        });

                        $('#result_count').text(result_count);
                        $('#notice_list').html(html);
                    } else {
                        alert(res.msg);
                        return;
                    }
                },
                error: function () {
                    alert('服务器异常');
                    return;
                }
            });

        } else if ("专业年级与课程建设".includes(search_input)) {
            // 查询学校专业年级与课程建设

        } else if ("国际合作".includes(search_input)) {
            // 查询学校国际合作

        } else if ("参与职教集团情况".includes(search_input)) {
            // 查询学校参与职教集团情况

        } else if ("校企合作".includes(search_input)) {
            // 查询学校校企合作

        } else {
            // 无结果
        }

    } else if (search_type == '2') {
        // 项目数据

    } else {
        // 查询类型错误
        alert('错误的查询类型');
        return;
    }
}

//拉取开放填报信息
/**
 * 载入修改密码界面
 */
function loadModifyPwd() {
    $('#content1').load('./modify_pwd.html');
    document.title = 'BEIS - 修改密码';
    // 菜单常亮
    $('#menu_1').attr("class", "dropdown");
    $('#menu_2').attr("class", "dropdown");
    $('#menu_3').attr("class", "dropdown");
}

/**
 * 修改密码第一步
 */
function modifyPwd_1() {

    var old_pwd = $('#pwd').val();
    if (old_pwd == "") {
        alert('请输入旧密码');
        return;
    } else if (old_pwd.length > 32) {
        alert('密码长度不能超过32位');
        return;
    } else {
        $.ajax({
            type: 'POST',
            url: '/management/pwd',
            data: {
                oldPwd: old_pwd
            },
            dataType: 'json',
            success: function (res) {
                if (res.code == 200) {
                    // 重新渲染第二步
                    var title = $('#step-title').children();
                    title.eq(0).css('color', '');
                    title.eq(0).attr("class", "active");
                    title.eq(2).css('color', '#FF8888');
                    title.eq(2).attr("class", "");

                    $('#tip-infor').text('输入新密码');
                    $('#next-btn').attr('onclick', 'modifyPwd_2()');
                    $('#pwd').val("");

                } else {
                    alert(res.msg);
                    return;
                }
            },
            error: function () {
                alert('服务器异常');
                return;
            }
        });
    }
}

/**
 * 修改密码第二步
 */
function modifyPwd_2() {
    var new_pwd_1 = $('#pwd').val();
    if (new_pwd_1 == "") {
        alert('请输入新密码');
        return;
    } else if (new_pwd_1.length > 32) {
        alert('密码长度不能超过32');
        return;
    } else {
        $.data(document.body, "new_pwd_1", new_pwd_1);
        // 重新渲染第三步
        var title = $('#step-title').children();
        title.eq(2).css('color', '');
        title.eq(2).attr("class", "active");
        title.eq(4).css('color', '#FF8888');
        title.eq(4).attr("class", "");

        $('#tip-infor').text('再次确认新密码');
        $('#next-btn').attr('onclick', 'modifyPwd_3()');
        $('#pwd').val("");
    }
}

/**
 * 修改密码第三步
 */
function modifyPwd_3() {
    var new_pwd_2 = $('#pwd').val();
    if (new_pwd_2 == "") {
        alert('请输入确认密码');
        return;
    } else if (new_pwd_2 != $.data(document.body, "new_pwd_1")) {
        alert('密码不一致');
        return;
    } else {
        $.ajax({
            type: 'PUT',
            url: '/management/pwd',
            data: {
                newPwd: $.data(document.body, "new_pwd_1")
            },
            dataType: 'json',
            success: function (res) {
                if (res.code == 200) {
                    $('#alert-dialog-infor').html('修改成功');
                    $('#alert-dialog').modal('show');
                    setTimeout("$('#alert-dialog').modal('hide')", 1500);
                    setTimeout("window.location.href='./city_main.html'", 2000);
                } else {
                    alert(res.msg);
                    return;
                }
            },
            error: function () {
                alert('服务器异常');
                return;
            }
        });
    }
}

// 拉取开放填报信息
function loadData() {
    $.ajax({
        type: 'GET',
        url: '/management/openmodify',
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                $.each(res.data, function (i, elt) {
                    var tr = $('#openModifyList').children().eq(elt.typeCode - 1);
                    tr.children().eq(1).children().eq(0).val(elt.startTime.split(' ')[0]);
                    tr.children().eq(2).children().eq(0).val(elt.endTime.split(' ')[0]);
                    var schoolUser_idList = new Array();
                    for (var i = 0; i < elt.schoolUsers.length; i++) {
                        schoolUser_idList.push(elt.schoolUsers[i].schoolUserId);
                    }
                    tr.children().eq(3).children().eq(0).select2().val(schoolUser_idList).trigger('change');
                })
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

//开放填报生效
function saveOpenModify(btn) {
    var tr = $(btn).parent().parent();
    var typeCode = tr.attr("id"); // 获取表序号
    var startTime = tr.children().eq(1).children().eq(0).val() + " 00:00:00";
    var endTime = tr.children().eq(2).children().eq(0).val() + " 23:59:59";
    var schoolUser_id = tr.children().eq(3).children().eq(0).val();
    if (schoolUser_id == null) {
        schoolUser_id = "";
    }

    $.ajax({
        type: 'POST',
        url: '/management/openmodify',
        data: {
            typeCode: typeCode,
            startTime: startTime,
            endTime: endTime,
            school_user_id_set: schoolUser_id.toString()
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {

                $('#alert-dialog').modal('show');
                setTimeout("$('#alert-dialog').modal('hide')", 2000);
                loadData();
            }
        },
        error: function () {
            alert('服务器异常');
        }
    });
}

// 拉取项目申报信息(已审核)
function getProjectManagement(page, type) {
    var url = "";
    switch (type) {
        case "1" :
            url = "/management/project/all";
            break;
        case "2" :
            url = "/management/project/country";
            break;
        case "3" :
            url = "/management/project/province";
            break;
        case "4" :
            url = "/management/project/city";
            break;
        default :
            break;
    }
    $.ajax({
        type: 'POST',
        url: url,
        data: {
            page: page,
            size: pageSize,
            sort: ['modifyTime', 'desc']
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功
                // 渲染数据

                $('#audit_list').html("");
                var dataHtml = "";
                $.each(res.data.content, function (index, ele) {
                    dataHtml += "<div class='accordion-group'>" +
                        "<div class='accordion-heading list' style='padding: 1% 1% 1% 1%;margin-bottom: 5px;' onclick='getAnalysisDiagram(this)' data-project_id='" + ele.projectDeclareId + "'>" +
                        "<div class='accordion-toggle collapsed' data-parent='#notice_list' data-toggle='collapse' href='#pane_" + index + "'>" +
                        "<span style='width:50%;font-size:18px;'><img class='img-circle' src='../img/psb.jpg' style='width:30px;height:30px;'>" +
                        "<b id='school_name'>" + ele.schoolBasic.schoolName + "</b>" +
                        "<br id='project_type'>" + ele.projectDeclareType + "</span>" +
                        "<span style='font-size:18px;'><a style='float:right;margin-left:5%;' >查看更多▼</a>" +
                        "<span id='modify_time' style='float:right;'>" + ele.modifyTime + "</span></span></div></div>" +
                        "<div class='accordion-body collapse' id='pane_" + index + "'>" +
                        "<div class='accordion-inner'><div id='project_analysis_daigram" + (index + 1) + "'></div>" +
                        "<hr /><div class='post-div'><span id='diagram_path_" + (index + 1) + "'></span><button class='btn btn-large btn-info ' onclick='chooseAnalysisDiagram(this)' style='margin-left:1%;'>选择文件</button>" +
                        "<input onchange='selectFile(this)' type='file' id='file_" + (index + 1) + "' style='display:none;'>" +
                        "<button class='btn btn-primary btn-large' style='margin-left:1%' onclick='postAnalysisDiagram(this)'>上    传</button></div></div></div></div>";
                });
                $('#audit_list').html(dataHtml);

                $('#pagination').jqPaginator('option', {
                    totalPages: res.data.totalPages
                });

            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

// 选择文件按钮
function chooseAnalysisDiagram(ele) {
    // 触发文件选择按钮
    $(ele).next().click();
}

// 上传图表显示文件路径
function selectFile(ele) {
    $(ele).prev().prev().text("当前文件：" + ($(ele).val().split('\\')[2]));
}

// 上传分析图表
function postAnalysisDiagram(ele) {
    var projectDeclareId = $(ele).parent().prev().prev().attr("data-project_id");
    var file = $(ele).prev()[0].files[0];
    // 打包data
    var data = new FormData();
    data.append('projectDeclareId', projectDeclareId);
    data.append('file', file);

    $.ajax({
        type: 'POST',
        url: '/management/analysis_diagram',
        cache: false, // 上传文件无需缓存
        processData: false, // 用于对data参数进行序列化处理 这里必须false
        contentType: false, // 必须
        data: data,
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                // 上传成功
                $('#alert-dialog-infor').text('上传成功');
                $('#alert-dialog').modal('show');
                setTimeout("$('#alert-dialog').modal('hide')", 2000);
                getProjectManagement($('#pagination').attr('currentPage') - 1);
                return;
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

// 加载项目分析图表（查看更多按钮）
function getAnalysisDiagram(ele) {
    if ($(ele).next().attr('class') == 'accordion-body collapse') {
        var project_id = $(ele).attr('data-project_id');
        $.ajax({
            type: 'GET',
            url: '/management/analysis_diagram?project_id=' + project_id,
            dataType: 'json',
            success: function (res) {
                if (res.code == 200) {
                    // 获取成功
                    var html = "<table style='width:100%'>";
                    $.each(res.data, function (index, elt) {
                        html += "<tr style='width:100%' data-analysis_diagram_id='" + elt.analysisDiagramId + "'><td>" + elt.analysisDiagramFile.toString().split('\\')[4] + "</td>" +
                            "<td style='text-align:right;'><a type='btn' onclick='deleteAnalysisDiagram(this)' style='cursor:pointer;'>" + "删除" + "</a><td></tr>";
                    })
                    html += "</table>";
                    $(ele).next().children().eq(0).children().eq(0).html(html);
                } else {
                    alert(res.msg);
                    return;
                }
            },
            error: function () {
                alert('服务器异常');
                return;
            }
        });
    }
}

// 删除项目分析图表
function deleteAnalysisDiagram(ele) {
    var analysisDiagram_id = $(ele).parent().parent().attr('data-analysis_diagram_id');
    $.ajax({
        type: 'POST',
        url: '/management/analysis_diagram',
        data: {
            _method: 'delete',
            analysisDiagram_id: analysisDiagram_id
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                // 删除成功
                $('#alert-dialog-infor').text('删除成功');
                $('#alert-dialog').modal('show');
                setTimeout("$('#alert-dialog').modal('hide')", 2000);

                // 重新拉取分析图表数据
                $(ele).parent().parent().parent().parent().parent().parent().parent().prev().children().eq(0).children().eq(1).children().eq(0).click();
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/**
 * 初始化凭证管理分页插件
 * @param totalCounts
 */
function initCMPage(totalCounts) {
    // 初始化凭证管理分页
    $('#pagination').jqPaginator({
        totalCounts: totalCounts, // 总记录数
        pageSize: pageSize, // 每页显示记录数
        visiblePages: 10, // 显示页按钮数
        currentPage: 1, // 当前页码
        wrapper: "<ul></ul>",
        first: '<li class="first"><a href="javascript:void(0);">首页</a></li>',
        prev: '<li class="prev"><a href="javascript:void(0);">上一页</a></li>',
        next: '<li class="next"><a href="javascript:void(0);">下一页</a></li>',
        last: '<li class="last"><a href="javascript:void(0);">末页</a></li>',
        page: '<li class="page"><a href="javascript:void(0);">{{page}}</a></li>',
        onPageChange: function PageChange(page_index, type) {
            getCertificate(page_index - 1);
        }
    });
}

/**
 * 获取所有凭证
 */
function getCertificate(page) {
    $.ajax({
        type: 'POST',
        url: '/management/certificate/all',
        data: {
            page: page,
            size: pageSize
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                // 拉取数据成功
                var html = "<tr style=\"font-size:18px;\">\n" +
                    "            <th style=\"text-align:center;\">凭证编号</th>\n" +
                    "            <th style=\"text-align:center;\">凭证类型</th>\n" +
                    "            <th style=\"text-align:center;\">凭证码</th>\n" +
                    "            <th style=\"text-align:center;\">操作</th>\n" +
                    "        </tr>";
                $.each(res.data.content, function (index, elt) {
                    html += "<tr>\n" +
                        "            <td style='text-align:center;'>" + elt.certificateId + "</td>\n" +
                        "            <td style='text-align:center;'>" + elt.userType + "</td>\n" +
                        "            <td style='text-align:center;'>" + elt.code + "</td>\n" +
                        "            <td style='text-align:center;'><button data-certificate-id='" + elt.certificateId + "' class='btn btn-primary' onclick='deleteCertificate(this)'>删除</button></td>\n" +
                        "        </tr>";
                });
                $('#certificate-list').html(html);
                $('#pagination').jqPaginator('option', {
                    totalCounts: res.data.totalElements
                });
                return;
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/**
 * 生成随机凭证码
 */
function createCertificateCode() {
    var randomCode = "";
    for (var i = 0; i < 10; i++) {
        // 生成10位随机整数
        randomCode += parseInt(Math.random() * (9 + 1), 10);
    }
    $('#certificate_code').val(randomCode);
    return;
}

/**
 * 保存凭证
 */
function saveCertificate() {
    var userType = $('#certificate_type').val();
    var code = $('#certificate_code').val();

    $.ajax({
        type: 'POST',
        url: '/management/certificate',
        data: {
            userType: userType,
            code: code
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                $('#certificate_code').val("");
                $('#modal-create-certificate').modal('hide');
                $('#alert-infor').text('保存成功');
                $('#alert-dialog').modal('show');
                setTimeout("$('#alert-dialog').modal('hide')", 1500);
                // 重新拉取数据
                getCertificate(0);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/**
 * 删除凭证
 * @param ele
 */
function deleteCertificate(ele) {
    var certificateId = $(ele).attr('data-certificate-id');

    $.ajax({
        type: 'POST',
        url: '/management/certificate',
        data: {
            certificateId: certificateId,
            _method: 'DELETE'
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                // 删除成功
                $('#alert-infor').text('删除成功');
                $('#alert-dialog').modal('show');
                setTimeout(" $('#alert-dialog').modal('hide')", 1500);
                // 重新拉取
                getCertificate(0);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/**
 * 初始化用户管理分页插件
 * @param totalCounts
 */
function initUMPage(totalCounts) {
    // 初始化用户管理分页
    $('#pagination').jqPaginator({
        totalCounts: totalCounts, // 总记录数
        pageSize: pageSize, // 每页显示记录数
        visiblePages: 10, // 显示页按钮数
        currentPage: 1, // 当前页码
        wrapper: "<ul></ul>",
        first: '<li class="first"><a href="javascript:void(0);">首页</a></li>',
        prev: '<li class="prev"><a href="javascript:void(0);">上一页</a></li>',
        next: '<li class="next"><a href="javascript:void(0);">下一页</a></li>',
        last: '<li class="last"><a href="javascript:void(0);">末页</a></li>',
        page: '<li class="page"><a href="javascript:void(0);">{{page}}</a></li>',
        onPageChange: function PageChange(page_index, type) {
            getSchoolUserInfor(page_index - 1);
        }
    });
}

/**
 * 用户管理- 获取学校用户数据
 */
function getSchoolUserInfor(page) {
    $.ajax({
        type: 'POST',
        url: '/management/schooluser',
        data: {
            size: pageSize,
            page: page
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功
                var html = "";
                $.each(res.data.content, function (index, elt) {
                    html += "<div class=\"accordion-group\">\n" +
                        "                <div class=\"accordion-heading list\"\n" +
                        "                     style=\"padding: 1% 1% 1% 1%;margin-bottom: 5px;\">\n" +
                        "                    <div class=\"accordion-toggle collapsed\" data-parent=\"#notice_list\"\n" +
                        "                         data-toggle=\"collapse\" href=\"#pane_1\">\n" +
                        "<span style=\"width:50%;font-size:18px;\"><img\n" +
                        "                                class=\"img-circle\" src=\"../img/psb.jpg\" style=\"width:30px;height:30px;\"><b>" + elt.schoolBasic.schoolName + "</b></span><span\n" +
                        "                            style=\"font-size:18px;\"><a\n" +
                        "                            style=\"float:right; margin-left:5%;\">查看更多▼</a></span>\n" +
                        "                    </div>\n" +
                        "                </div>\n" +
                        "                <div class=\"accordion-body collapse undo-accordion-body\" id=\"pane_1\">\n" +
                        "                    <div class=\"accordion-inner\">\n" +
                        "                        <div> <table class='table table-hover table-striped' data-test='1'>" +
                        "                               <tr><td style='text-align:left'>用户账号</td><td style='text-align:right'>" + elt.schoolUserId + "</td>" +
                        "</tr>" +
                        "                               <tr><td style='text-align:left'>用户密码</td><td style='text-align:right'>●●●●</td>" +
                        "</tr>" +
                        "                               <tr><td style='text-align:left'>联系电话</td><td style='text-align:right'>" + elt.schoolUserPhone + "</td>" +
                        "</tr>" +
                        "                               <tr><td style='text-align:left'>注册凭证</td><td style='text-align:right'>" + elt.certificate.code + "</td>" +
                        "</tr>" +
                        "</table></div>\n" +
                        "                        <hr/>\n" +
                        "                        <div>\n" +
                        "                            <button class=\"btn btn-large btn-danger audit-btn\" onclick='deleteSchoolUser(this)'>删除</button>\n" +
                        "                            <button class=\"btn btn-large btn-warning audit-btn\" onclick='modifySchoolUser(this)'>修改</button>\n" +
                        "                        </div>\n" +
                        "                    </div>\n" +
                        "                </div>\n" +
                        "            </div>";
                });
                $('#infor_list').html(html);
                $('#pagination').jqPaginator('option', {
                    totalCounts: res.data.totalElements
                });
            } else {
                alert(res.msg);
                return;
            }
        },
    });
}

/**
 * 删除学校用户
 * @param ele
 */
function deleteSchoolUser(ele) {

}

/**
 * 打开修改学校用户模态框
 * @param ele
 */
function modifySchoolUser(ele) {
    $('#dialog-title').text('修改信息');
    var table = $(ele).parent().prev().prev().children().eq(0);
    var html = "<table class='table table-hover table-striped'>";
    $.each(table.children().eq(0).children(), function (index, elt) {
        var tr = "";
        if (index == 0) {
            tr = "<tr><td style='text-align:left'>" + $(elt).children().eq(0).html() + "</td><td style='text-align:right'><input disabled='disabled' type='text' value='" + $(elt).children().eq(1).html() + "'/></td></tr>";
        } else if (index == 1) {
            tr = "<tr><td style='text-align:left'>" + $(elt).children().eq(0).html() + "</td><td style='text-align:right'><input type='password' value='" + $(elt).children().eq(1).html() + "'/></td></tr>";
        } else {
            tr = "<tr><td style='text-align:left'>" + $(elt).children().eq(0).html() + "</td><td style='text-align:right'><input type='text' value='" + $(elt).children().eq(1).html() + "'/></td></tr>";
        }
        html += tr;
    });
    html += "</table>";
    $('#alert-dialog-infor').html(html);
    $('#second-btn').text('确认修改');
    $('#second-btn').attr("onclick", "saveSchoolUserModify(this)");
    $('#alert-dialog').modal('show');
}

/**
 * 修改用户信息
 * @param ele  修改按钮
 */
function saveSchoolUserModify(ele) {
    var trs = $(ele).parent().prev().children().eq(0).children().eq(0).children();
    var schoolUserId = trs.eq(0).children().eq(1).children().eq(0).val();
    var schoolUserPwd = trs.eq(1).children().eq(1).children().eq(0).val();
    var schoolUserPhone = trs.eq(2).children().eq(1).children().eq(0).val();
    var certificate_code = trs.eq(3).children().eq(1).children().eq(0).val();

    $.ajax({
        type: 'POST',
        url: '/management/schooluser',
        data: {
            schoolUserId: schoolUserId,
            schoolUserPwd: schoolUserPwd,
            schoolUserPhone: schoolUserPhone,
            certificate_code: certificate_code,
            _method: 'PUT'
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                // 修改成功
                $('#alert-dialog').modal('hide');
                $('#alert-modal').modal('show');
                setTimeout("$('#alert-modal').modal('hide')", 1500);
                getSchoolUserInfor(0);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/**
 * 用户管理- 获取区县用户数据
 */
function getCountyUserInfor(page) {
    $.ajax({
        type: 'POST',
        url: '/management/countyuser',
        data: {
            size: pageSize,
            page: page
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功
                var html = "";
                $.each(res.data.content, function (index, elt) {
                    html += "<div class=\"accordion-group\">\n" +
                        "                <div class=\"accordion-heading list\"\n" +
                        "                     style=\"padding: 1% 1% 1% 1%;margin-bottom: 5px;\">\n" +
                        "                    <div class=\"accordion-toggle collapsed\" data-parent=\"#notice_list\"\n" +
                        "                         data-toggle=\"collapse\" href=\"#pane_1\">\n" +
                        "<span style=\"width:50%;font-size:18px;\"><img\n" +
                        "                                class=\"img-circle\" src=\"../img/psb.jpg\" style=\"width:30px;height:30px;\"><b>" + elt.countyEdbName + "</b></span><span\n" +
                        "                            style=\"font-size:18px;\"><a\n" +
                        "                            style=\"float:right; margin-left:5%;\">查看更多▼</a></span>\n" +
                        "                    </div>\n" +
                        "                </div>\n" +
                        "                <div class=\"accordion-body collapse undo-accordion-body\" id=\"pane_1\">\n" +
                        "                    <div class=\"accordion-inner\">\n" +
                        "                        <div> <table class='table table-hover table-striped' data-test='1'>" +
                        "                               <tr><td style='text-align:left'>用户账号</td><td style='text-align:right'>" + elt.countyUserId + "</td>" +
                        "</tr>" +
                        "                               <tr><td style='text-align:left'>用户密码</td><td style='text-align:right'>●●●●</td>" +
                        "</tr>" +
                        "                               <tr><td style='text-align:left'>联系电话</td><td style='text-align:right'>" + elt.countyUserPhone + "</td>" +
                        "</tr>" +
                        "                               <tr><td style='text-align:left'>行政编号</td><td style='text-align:right'>" + elt.adminCode + "</td>" +
                        "</tr>" +
                        "                               <tr><td style='text-align:left'>办公地址</td><td style='text-align:right'>" + elt.countyAddress + "</td>" +
                        "</tr>" +
                        "                               <tr><td style='text-align:left'>注册凭证</td><td style='text-align:right'>" + elt.certificate.code + "</td>" +
                        "</tr>" +
                        "</table></div>\n" +
                        "                        <hr/>\n" +
                        "                        <div>\n" +
                        "                            <button class=\"btn btn-large btn-danger audit-btn\" onclick='deleteCountyUser(this)'>删除</button>\n" +
                        "                            <button class=\"btn btn-large btn-warning audit-btn\" onclick='modifyCountyUser(this)'>修改</button>\n" +
                        "                        </div>\n" +
                        "                    </div>\n" +
                        "                </div>\n" +
                        "            </div>";
                });
                $('#infor_list').html(html);
                $('#pagination').jqPaginator('option', {
                    totalCounts: res.data.totalElements
                });
            } else {
                alert(res.msg);
                return;
            }
        },
    });
}

/**
 * 删除区县用户
 * @param ele
 */
function deleteCountyUser(ele) {

}

/**
 * 打开修改区县用户模态框
 * @param ele
 */
function modifyCountyUser(ele) {
    $('#dialog-title').text('修改信息');
    var table = $(ele).parent().prev().prev().children().eq(0);
    var html = "<table class='table table-hover table-striped'>";
    $.each(table.children().eq(0).children(), function (index, elt) {
        var tr = "";
        if (index == 0) {
            tr = "<tr><td style='text-align:left'>" + $(elt).children().eq(0).html() + "</td><td style='text-align:right'><input disabled='disabled' type='text' value='" + $(elt).children().eq(1).html() + "'/></td></tr>";
        } else if (index == 1) {
            tr = "<tr><td style='text-align:left'>" + $(elt).children().eq(0).html() + "</td><td style='text-align:right'><input type='password' value='" + $(elt).children().eq(1).html() + "'/></td></tr>";
        } else {
            tr = "<tr><td style='text-align:left'>" + $(elt).children().eq(0).html() + "</td><td style='text-align:right'><input type='text' value='" + $(elt).children().eq(1).html() + "'/></td></tr>";
        }
        html += tr;
    });
    html += "</table>";
    $('#alert-dialog-infor').html(html);
    $('#second-btn').text('确认修改');
    $('#second-btn').attr("onclick", "saveCountyUserModify(this)");
    $('#alert-dialog').modal('show');
}

/**
 * 修改区县信息
 * @param ele  修改按钮
 */
function saveCountyUserModify(ele) {
    var trs = $(ele).parent().prev().children().eq(0).children().eq(0).children();
    var countyUserId = trs.eq(0).children().eq(1).children().eq(0).val();
    var countyUserPwd = trs.eq(1).children().eq(1).children().eq(0).val();
    var countyUserPhone = trs.eq(2).children().eq(1).children().eq(0).val();
    var adminCode = trs.eq(3).children().eq(1).children().eq(0).val();
    var countyAddress = trs.eq(4).children().eq(1).children().eq(0).val();
    var certificate_code = trs.eq(5).children().eq(1).children().eq(0).val();

    $.ajax({
        type: 'POST',
        url: '/management/countyuser',
        data: {
            countyUserId: countyUserId,
            countyUserPwd: countyUserPwd,
            countyUserPhone: countyUserPhone,
            adminCode: adminCode,
            countyAddress: countyAddress,
            certificate_code: certificate_code,
            _method: 'PUT'
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                // 修改成功
                $('#alert-dialog').modal('hide');
                $('#alert-modal').modal('show');
                setTimeout("$('#alert-modal').modal('hide')", 1500);
                getCountyUserInfor(0);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/**
 * 用户管理- 获取市局用户数据
 */
function getCityUserInfor(page) {
    $.ajax({
        type: 'POST',
        url: '/management/cityuser',
        data: {
            size: pageSize,
            page: page
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功
                var html = "";
                $.each(res.data.content, function (index, elt) {
                    html += "<div class=\"accordion-group\">\n" +
                        "                <div class=\"accordion-heading list\"\n" +
                        "                     style=\"padding: 1% 1% 1% 1%;margin-bottom: 5px;\">\n" +
                        "                    <div class=\"accordion-toggle collapsed\" data-parent=\"#notice_list\"\n" +
                        "                         data-toggle=\"collapse\" href=\"#pane_1\">\n" +
                        "<span style=\"width:50%;font-size:18px;\"><img\n" +
                        "                                class=\"img-circle\" src=\"../img/psb.jpg\" style=\"width:30px;height:30px;\"><b>" + elt.cityEdbName + "</b></span><span\n" +
                        "                            style=\"font-size:18px;\"><a\n" +
                        "                            style=\"float:right; margin-left:5%;\">查看更多▼</a></span>\n" +
                        "                    </div>\n" +
                        "                </div>\n" +
                        "                <div class=\"accordion-body collapse undo-accordion-body\" id=\"pane_1\">\n" +
                        "                    <div class=\"accordion-inner\">\n" +
                        "                        <div> <table class='table table-hover table-striped' data-test='1'>" +
                        "                               <tr><td style='text-align:left'>用户账号</td><td style='text-align:right'>" + elt.cityUserId + "</td>" +
                        "</tr>" +
                        "                               <tr><td style='text-align:left'>用户密码</td><td style='text-align:right'>●●●●</td>" +
                        "</tr>" +
                        "                               <tr><td style='text-align:left'>联系电话</td><td style='text-align:right'>" + elt.cityUserPhone + "</td>" +
                        "</tr>" +
                        "                               <tr><td style='text-align:left'>行政编号</td><td style='text-align:right'>" + elt.adminCode + "</td>" +
                        "</tr>" +
                        "                               <tr><td style='text-align:left'>办公地址</td><td style='text-align:right'>" + elt.cityAddress + "</td>" +
                        "</tr>" +
                        "                               <tr><td style='text-align:left'>注册凭证</td><td style='text-align:right'>" + elt.certificate.code + "</td>" +
                        "</tr>" +
                        "</table></div>\n" +
                        "                        <hr/>\n" +
                        "                        <div>\n" +
                        "                            <button class=\"btn btn-large btn-danger audit-btn\" onclick='deleteCityUser(this)'>删除</button>\n" +
                        "                            <button class=\"btn btn-large btn-warning audit-btn\" onclick='modifyCityUser(this)'>修改</button>\n" +
                        "                        </div>\n" +
                        "                    </div>\n" +
                        "                </div>\n" +
                        "            </div>";
                });
                $('#infor_list').html(html);
                $('#pagination').jqPaginator('option', {
                    totalCounts: res.data.totalElements
                });
            } else {
                alert(res.msg);
                return;
            }
        },
    });
}

/**
 * 删除市局用户
 * @param ele
 */
function deleteCityUser(ele) {

}

/**
 * 打开修改市局用户模态框
 * @param ele
 */
function modifyCityUser(ele) {
    $('#dialog-title').text('修改信息');
    var table = $(ele).parent().prev().prev().children().eq(0);
    var html = "<table class='table table-hover table-striped'>";
    $.each(table.children().eq(0).children(), function (index, elt) {
        var tr = "";
        if (index == 0) {
            tr = "<tr><td style='text-align:left'>" + $(elt).children().eq(0).html() + "</td><td style='text-align:right'><input disabled='disabled' type='text' value='" + $(elt).children().eq(1).html() + "'/></td></tr>";
        } else if (index == 1) {
            tr = "<tr><td style='text-align:left'>" + $(elt).children().eq(0).html() + "</td><td style='text-align:right'><input type='password' value='" + $(elt).children().eq(1).html() + "'/></td></tr>";
        } else {
            tr = "<tr><td style='text-align:left'>" + $(elt).children().eq(0).html() + "</td><td style='text-align:right'><input type='text' value='" + $(elt).children().eq(1).html() + "'/></td></tr>";
        }
        html += tr;
    });
    html += "</table>";
    $('#alert-dialog-infor').html(html);
    $('#second-btn').text('确认修改');
    $('#second-btn').attr("onclick", "saveCityUserModify(this)");
    $('#alert-dialog').modal('show');
}

/**
 * 修改市局信息
 * @param ele  修改按钮
 */
function saveCityUserModify(ele) {
    var trs = $(ele).parent().prev().children().eq(0).children().eq(0).children();
    var cityUserId = trs.eq(0).children().eq(1).children().eq(0).val();
    var cityUserPwd = trs.eq(1).children().eq(1).children().eq(0).val();
    var cityUserPhone = trs.eq(2).children().eq(1).children().eq(0).val();
    var adminCode = trs.eq(3).children().eq(1).children().eq(0).val();
    var cityUserAddress = trs.eq(4).children().eq(1).children().eq(0).val();
    var certificate_code = trs.eq(5).children().eq(1).children().eq(0).val();

    $.ajax({
        type: 'POST',
        url: '/management/cityuser',
        data: {
            cityUserId: cityUserId,
            cityUserPwd: cityUserPwd,
            cityUserPhone: cityUserPhone,
            adminCode: adminCode,
            cityAddress: cityUserAddress,
            certificate_code: certificate_code,
            _method: 'PUT'
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                // 修改成功
                $('#alert-dialog').modal('hide');
                $('#alert-modal').modal('show');
                setTimeout("$('#alert-modal').modal('hide')", 1500);
                getCityUserInfor(0);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/**
 * 用户管理- 获取高级用户数据
 */
function getLeaderUserInfor(page) {
    $.ajax({
        type: 'POST',
        url: '/management/leaderuser',
        data: {
            size: pageSize,
            page: page
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功
                var html = "";
                $.each(res.data.content, function (index, elt) {
                    html += "<div class=\"accordion-group\">\n" +
                        "                <div class=\"accordion-heading list\"\n" +
                        "                     style=\"padding: 1% 1% 1% 1%;margin-bottom: 5px;\">\n" +
                        "                    <div class=\"accordion-toggle collapsed\" data-parent=\"#notice_list\"\n" +
                        "                         data-toggle=\"collapse\" href=\"#pane_1\">\n" +
                        "<span style=\"width:50%;font-size:18px;\"><img\n" +
                        "                                class=\"img-circle\" src=\"../img/psb.jpg\" style=\"width:30px;height:30px;\"><b>" + elt.leaderUserName + "</b></span><span\n" +
                        "                            style=\"font-size:18px;\"><a\n" +
                        "                            style=\"float:right; margin-left:5%;\">查看更多▼</a></span>\n" +
                        "                    </div>\n" +
                        "                </div>\n" +
                        "                <div class=\"accordion-body collapse undo-accordion-body\" id=\"pane_1\">\n" +
                        "                    <div class=\"accordion-inner\">\n" +
                        "                        <div> <table class='table table-hover table-striped' data-test='1'>" +
                        "                               <tr><td style='text-align:left'>用户账号</td><td style='text-align:right'>" + elt.leaderUserId + "</td>" +
                        "</tr>" +
                        "                               <tr><td style='text-align:left'>用户密码</td><td style='text-align:right'>●●●●</td>" +
                        "</tr>" +
                        "                               <tr><td style='text-align:left'>联系电话</td><td style='text-align:right'>" + elt.leaderUserPhone + "</td>" +
                        "</tr>" +
                        "                               <tr><td style='text-align:left'>注册凭证</td><td style='text-align:right'>" + elt.certificate.code + "</td>" +
                        "</tr>" +
                        "</table></div>\n" +
                        "                        <hr/>\n" +
                        "                        <div>\n" +
                        "                            <button class=\"btn btn-large btn-danger audit-btn\" onclick='deleteLeaderUser(this)'>删除</button>\n" +
                        "                            <button class=\"btn btn-large btn-warning audit-btn\" onclick='modifyLeaderUser(this)'>修改</button>\n" +
                        "                        </div>\n" +
                        "                    </div>\n" +
                        "                </div>\n" +
                        "            </div>";
                });
                $('#infor_list').html(html);
                $('#pagination').jqPaginator('option', {
                    totalCounts: res.data.totalElements
                });
            } else {
                alert(res.msg);
                return;
            }
        },
    });
}

/**
 * 删除市局用户
 * @param ele
 */
function deleteLeaderUser(ele) {

}

/**
 * 打开修改高级用户模态框
 * @param ele
 */
function modifyLeaderUser(ele) {
    $('#dialog-title').text('修改信息');
    var table = $(ele).parent().prev().prev().children().eq(0);
    var html = "<table class='table table-hover table-striped'>";
    $.each(table.children().eq(0).children(), function (index, elt) {
        var tr = "";
        if (index == 0) {
            tr = "<tr><td style='text-align:left'>" + $(elt).children().eq(0).html() + "</td><td style='text-align:right'><input disabled='disabled' type='text' value='" + $(elt).children().eq(1).html() + "'/></td></tr>";
        } else if (index == 1) {
            tr = "<tr><td style='text-align:left'>" + $(elt).children().eq(0).html() + "</td><td style='text-align:right'><input type='password' value='" + $(elt).children().eq(1).html() + "'/></td></tr>";
        } else {
            tr = "<tr><td style='text-align:left'>" + $(elt).children().eq(0).html() + "</td><td style='text-align:right'><input type='text' value='" + $(elt).children().eq(1).html() + "'/></td></tr>";
        }
        html += tr;
    });
    html += "</table>";
    $('#alert-dialog-infor').html(html);
    $('#second-btn').text('确认修改');
    $('#second-btn').attr("onclick", "saveLeaderUserModify(this)");
    $('#alert-dialog').modal('show');
}

/**
 * 修改高级用户信息
 * @param ele  修改按钮
 */
function saveLeaderUserModify(ele) {
    var trs = $(ele).parent().prev().children().eq(0).children().eq(0).children();
    var leaderUserId = trs.eq(0).children().eq(1).children().eq(0).val();
    var leaderUserPwd = trs.eq(1).children().eq(1).children().eq(0).val();
    var leaderUserPhone = trs.eq(2).children().eq(1).children().eq(0).val();
    var certificate_code = trs.eq(3).children().eq(1).children().eq(0).val();

    $.ajax({
        type: 'POST',
        url: '/management/leaderuser',
        data: {
            leaderUserId: leaderUserId,
            leaderUserPwd: leaderUserPwd,
            leaderUserPhone: leaderUserPhone,
            certificate_code: certificate_code,
            _method: 'PUT'
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                // 修改成功
                $('#alert-dialog').modal('hide');
                $('#alert-modal').modal('show');
                setTimeout("$('#alert-modal').modal('hide')", 1500);
                setTimeout("$('#alert-modal').modal('hide')", 1500);
                getLeaderUserInfor(0);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/**
 * 初始化发布公告分页插件
 * @param totalCounts
 */
function initNoticePage(totalCounts) {
    $('#pagination').jqPaginator({
        totalCounts: totalCounts, // 总记录数
        pageSize: pageSize, // 每页显示记录数
        visiblePages: 10, // 显示页按钮数
        currentPage: 1, // 当前页码
        wrapper: "<ul></ul>",
        first: '<li class="first"><a href="javascript:void(0);">首页</a></li>',
        prev: '<li class="prev"><a href="javascript:void(0);">上一页</a></li>',
        next: '<li class="next"><a href="javascript:void(0);">下一页</a></li>',
        last: '<li class="last"><a href="javascript:void(0);">末页</a></li>',
        page: '<li class="page"><a href="javascript:void(0);">{{page}}</a></li>',
        onPageChange: function PageChange(page_index, type) {
            getSchoolNoticeUser(page_index - 1);
        }
    });
}

/**
 * 公告 ：获取学校用户
 * @param page
 */
function getSchoolNoticeUser(page) {
    $.ajax({
        type: 'POST',
        url: '/management/schooluser',
        data: {
            page: page,
            size: pageSize
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                var html = "";
                $.each(res.data.content, function (index, elt) {
                    html += "<div class=\"accordion-group\">\n";

                    if ($.inArray(elt.schoolUserId, schoolUserList) > -1) {
                        html += "<div class=\"accordion-heading list select-list\" data-selected='1'";
                    } else {
                        html += "<div class=\"accordion-heading list \" data-selected='0'";
                    }
                    html += " data-user-type='school' data-user-id='" + elt.schoolUserId + "' onclick=\"chooseUser(this)\"\n" +
                        "style=\"padding: 1% 1% 1% 1%;margin-bottom: 5px;\">\n" +
                        "<div class=\"accordion-toggle collapsed\" data-parent=\"#notice_list\"\n" +
                        "data-toggle=\"collapse\" href=\"#pane_1\">\n" +
                        "<span style=\"width:50%;font-size:18px;\"><img\n" +
                        "class=\"img-circle\" src=\"../img/psb.jpg\" style=\"width:30px;height:30px;\"><b>" + elt.schoolBasic.schoolName + "</b><br><span style=\"color:grey;\">" + elt.schoolBasic.schoolAddress +
                        "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + elt.schoolUserPhone + "</span></div></div>\n" +
                        "<div class=\"accordion-body collapse unselect-accordion-body\" >\n" +
                        "<div class=\"accordion-inner\"></div></div></div>";
                });
                $('#notice_list').html(html);
                $('#pagination').jqPaginator('option', {
                    totalCounts: res.data.totalElements
                });
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/**
 * 公告 ：获取区县用户
 * @param page
 */
function getCountyNoticeUser(page) {
    $.ajax({
        type: 'POST',
        url: '/management/countyuser',
        data: {
            page: page,
            size: pageSize
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                var html = "";
                $.each(res.data.content, function (index, elt) {
                    html += "<div class=\"accordion-group\">\n";

                    if ($.inArray(elt.countyUserId, countyUserList) > -1) {
                        html += "<div class=\"accordion-heading list select-list\" data-selected='1'";
                    } else {
                        html += "<div class=\"accordion-heading list \" data-selected='0'";
                    }
                    html += "data-user-type='county' data-user-id='" + elt.countyUserId + "' onclick=\"chooseUser(this)\"\n" +
                        "style=\"padding: 1% 1% 1% 1%;margin-bottom: 5px;\">\n" +
                        "<div class=\"accordion-toggle collapsed\" data-parent=\"#notice_list\"\n" +
                        "data-toggle=\"collapse\" href=\"#pane_1\">\n" +
                        "<span style=\"width:50%;font-size:18px;\"><img\n" +
                        "class=\"img-circle\" src=\"../img/psb.jpg\" style=\"width:30px;height:30px;\"><b>" + elt.countyEdbName + "</b><br><span style=\"color:grey;\">" + elt.countyAddress +
                        "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + elt.countyUserPhone + "</span></div></div>\n" +
                        "<div class=\"accordion-body collapse unselect-accordion-body\" >\n" +
                        "<div class=\"accordion-inner\"></div></div></div>";
                });
                $('#notice_list').html(html);
                $('#pagination').jqPaginator('option', {
                    totalCounts: res.data.totalElements
                });
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/**
 * 公告 ：获取高级用户
 * @param page
 */
function getLeaderNoticeUser(page) {
    $.ajax({
        type: 'POST',
        url: '/management/leaderuser',
        data: {
            page: page,
            size: pageSize
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                var html = "";
                $.each(res.data.content, function (index, elt) {
                    html += "<div class=\"accordion-group\">\n";

                    if ($.inArray(elt.leaderUserId, leaderUserList) > -1) {
                        html += "<div class=\"accordion-heading list select-list\" data-selected='1'";
                    } else {
                        html += "<div class=\"accordion-heading list \" data-selected='0'";
                    }
                    html += "data-user-type='leader' data-user-id='" + elt.leaderUserId + "' onclick=\"chooseUser(this)\"\n" +
                        "style=\"padding: 1% 1% 1% 1%;margin-bottom: 5px;\">\n" +
                        "<div class=\"accordion-toggle collapsed\" data-parent=\"#notice_list\"\n" +
                        "data-toggle=\"collapse\" href=\"#pane_1\">\n" +
                        "<span style=\"width:50%;font-size:18px;\"><img\n" +
                        "class=\"img-circle\" src=\"../img/psb.jpg\" style=\"width:30px;height:30px;\"><b>" + elt.leaderUserName + "</b><br><span style=\"color:grey;\">" + elt.leaderUserPhone + "</span></div></div>\n" +
                        "<div class=\"accordion-body collapse unselect-accordion-body\" >\n" +
                        "<div class=\"accordion-inner\"></div></div></div>";
                });
                $('#notice_list').html(html);
                $('#pagination').jqPaginator('option', {
                    totalCounts: res.data.totalElements
                });
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/**
 * 公告：选择用户
 * @param ele
 */
function chooseUser(ele) {
    var userType = $(ele).attr('data-user-type');
    var userId = $(ele).attr('data-user-id');
    if ($(ele).attr('data-selected') == '1') {
        // 取消选择
        $(ele).attr('data-selected', '0');
        $(ele).attr("class", "accordion-heading list");
        switch (userType) {
            case "school" :
                $.each(schoolUserList, function (i, elt) {
                    if (elt == userId) {
                        schoolUserList.splice(i, 1);
                        return;
                    }
                });
                break;
            case "county" :
                $.each(countyUserList, function (i, elt) {
                    if (elt == userId) {
                        countyUserList.splice(i, 1);
                        break;
                    }
                });
                break;
            case "leader" :
                $.each(leaderUserList, function (i, elt) {
                    if (elt == userId) {
                        leaderUserList.splice(i, 1);
                        break;
                    }
                });
                break;
            default :
                break;
        }
    } else {
        // 选择
        $(ele).attr('data-selected', '1');
        $(ele).attr("class", "select-list accordion-heading list");
        switch (userType) {
            case "school" :
                schoolUserList.push(userId);
                break;
            case "county" :
                countyUserList.push(userId);
                break;
            case "leader" :
                leaderUserList.push(userId);
                break;
            default :
                break;
        }
    }
    if (schoolUserList.length > 0 || countyUserList.length > 0 || leaderUserList.length > 0) {
        $('#publish-btn').attr("class", "btn btn-primary btn-large");
    } else {
        $('#publish-btn').attr("class", "btn disabled btn-primary btn-large");
    }
}

// 选择文件按钮
function chooseFile(ele) {
    // 触发文件选择按钮
    $(ele).next().click();
}

// 显示文件路径
function selectFile(ele) {
    $(ele).prev().prev().text("当前文件：" + ($(ele).val().split('\\')[2]));
}

/**
 * 打开发布公告模态框
 */
function openNoticeModal() {
    $('#publish-modal').modal('show');
}

/**
 * 发布公告
 */
function publishNotice() {
    var announcementType = $('#notice_type').val();
    var announcementInfor = $('#notice_content').val();


    var data = new FormData();
    data.append("announcementType", announcementType);
    data.append("announcementInfor", announcementInfor);
    if ($('#attachment_file').val() != "") {
        var attachmentFile = $('#attachment_file')[0].files[0];
        data.append("attachmentFile", attachmentFile);
    }

    data.append("schoolUserIds", schoolUserList);
    data.append("countyUserIds", countyUserList);
    data.append("leaderUserIds", leaderUserList);

    $.ajax({
        type: 'POST',
        url: '/management/announcement',
        data: data,
        cache: false, // 上传文件无需缓存
        processData: false, // 用于对data参数进行序列化处理 这里必须false
        contentType: false, // 必须
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                // 发布成功

                // $.holdReady(true);
                $('#publish-modal').modal('hide');
                $('#alert-modal').modal('show');
                setTimeout(" $('#alert-modal').modal('hide');", 1500);
                setTimeout("$('#content1').load('./publish_announcement.html');", 2000);


            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

// 选择切换框按钮改变CSS
function select_different_type(ele) {
    var li = $(ele).parent();
    if ($(ele).attr('data-num') == "1") {
        req_type = 1;
    } else if ($(ele).attr('data-num') == "2") {
        req_type = 2;
    } else if ($(ele).attr('data-num') == "3") {
        req_type = 3;
    } else if ($(ele).attr('data-num') == "4") {
        req_type = 4;
    }
    //	alert(li.val());
    li.attr("class", "active");
    $(ele).css("color", "#EF7178");
    $(ele).css("border-bottom-color", "#EF7178");
    var other_li = li.siblings('li');
    other_li.each(function (i, element) {
        $(this).removeClass("active");
        $(this).children().eq(0).css("color", "grey");
        $(this).children().eq(0).css("border-bottom-color", "");
    })
    if (select_type == 1) {
        getStudentBasicSituation();
    } else if (select_type == 2) {
        getSchoolCondition();
    } else if (select_type == 3) {
        getMGCC();
    } else if (select_type == 4) {
        getVEG();
    } else if (select_type == 5) {
        getGlobalCooperation();
    } else if (select_type == 6) {
        getSCC();
    } else if (select_type == 7) {
        getTeacherBasicSituation();
    } else if (select_type == 8) {
        getPCTS();
    } else if (select_type == 9) {
        getMTS();
    } else if (select_type == 10) {
        getVT();
    } else if (select_type == 11) {
        getWSTB();
    } else if (select_type == 12) {
        getMTB();
    } else if (select_type == 13) {
        getPTB();
    } else if (select_type == 14) {
        getTPBS();
    } else if (select_type == 15) {
        getProjectDeclare();
    }
}

function initAuditPage(totalElements) {
    // 初始化分页
    $('#pagination').jqPaginator({
        totalCounts: totalElements, // 总记录数
        pageSize: 8, // 每页显示记录数
        visiblePages: 10, // 显示页按钮数
        currentPage: 1, // 当前页码
        wrapper: "<ul></ul>",
        first: '<li class="first"><a href="javascript:void(0);">首页</a></li>',
        prev: '<li class="prev"><a href="javascript:void(0);">上一页</a></li>',
        next: '<li class="next"><a href="javascript:void(0);">下一页</a></li>',
        last: '<li class="last"><a href="javascript:void(0);">末页</a></li>',
        page: '<li class="page"><a href="javascript:void(0);">{{page}}</a></li>',
        onPageChange: function PageChange(page_index, type) {
            getStudentBasicSituation();
        }
    });
}

//载入审核界面
function loadAudit() {
    $('#content1').load('./city_audit.html');
    document.title = 'BEIS - 审核系统';
    // 菜单常亮
    $('#menu_1').attr("class", "dropdown active");
    $('#menu_2').attr("class", "dropdown");
    $('#menu_3').attr("class", "dropdown");

}

/*
 * 从数据库读取学生基本情况表信息
 */
function getStudentBasicSituation() {
    var arr = {
        params: ['param', 'param2']
    };
    $.ajax({
        type: 'POST',
        url: '/cityuser/getstudentbasicsituation',
        data: {
            page: 0,
            size: 10,
            sort: 'modifyTime',
            sort: 'desc',
            req_type: req_type
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功
                // 渲染数据

                $('#audit_list').html("");
                var dataHtml = "";
                $.each(res.data.content, function (index, ele) {
                    dataHtml += "<div class='accordion-group'>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #9B9B9B;'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #EF7178;'>";
                    } else {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;'>";
                    }

                    dataHtml += "<div class='accordion-toggle collapsed' data-parent='#notice_list' data-toggle='collapse' href='#pane_" + index + "'>" +
                        "<span style='width:50%;font-size:18px;'><img class='img-circle' src='../img/psb.jpg' style='width:30px;'>" +
                        "<b id='school_name'>" + ele.schoolBasic.schoolName + "</b>" +
                        "<br>学生基本情况</span>" +
                        "<span style='font-size:18px;'><a style='float:right; margin-left:5%;'>查看更多▼</a>" +
                        "<span style='float:right;'>" + ele.modifyTime + "</span></span></div></div>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-body collapse undo-accordion-body' id='pane_" + index + "'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-body collapse nopass-accordion-body' id='pane_" + index + "'>";
                    } else {
                        dataHtml += "<div class='accordion-body collapse pass-accordion-body' id='pane_" + index + "'>";
                    }
                    dataHtml += "<div class='accordion-inner'>" +
                        "<table cellpadding='3' class='table table-striped' style='width:100%;'>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>学生基本情况表编号</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.studentBasicSituationId + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>学生人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.studentCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>班级数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.classCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>流失学生数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.loseStudentCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>毕业生双证率</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.graduateDoubleCertificateRate + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>在国家级职业技能大赛获奖数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.nationalCompetitionAwardCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>在省部级职业技能大赛获奖数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.provinceCompetitionAwardCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>在地市级职业技能大赛获奖数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.cityCompetitionAwardCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>获得国际职业资格证书人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.internationalCertificateCount + "</td></tr></table>" +
                        "<hr />";

                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div data-id='" + ele.studentBasicSituationId + "'><button class='btn btn-large btn-primary audit-btn' onclick='passSbs(this)'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' onclick='rejectSbs(this)'>驳回</button></div></div></div></div>";
                    } else {
                        dataHtml += "<div><button class='btn btn-large btn-primary audit-btn' disabled='disabled'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' disabled='disabled'>驳回</button></div></div></div></div>";
                    }

                });
                $('#audit_list').html(dataHtml);

                $('#pagination').jqPaginator('option', {
                    totalPages: res.data.totalPages
                });

            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

// 审核通过
function passSbs(ele) {
    var sbs_id = $(ele).parent().attr('data-id');
    $.ajax({
        type: 'POST',
        url: '/cityuser/passstudentbasicsituation',
        data: {
            studentBasicSituationId: sbs_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "black");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse pass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).next().attr("disabled", true);

            } else {
                alert(res.msg);
                return;
            }

        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

//审核不通过
function rejectSbs(ele) {
    var sbs_id = $(ele).parent().attr('data-id');

    $.ajax({
        type: 'POST',
        url: '/cityuser/rejectstudentbasicsituation',
        data: {
            studentBasicSituationId: sbs_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "#EF7178");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse nopass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).prev().attr("disabled", true);

            } else {
                alert(res.msg);
                return;
            }

        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/*
 * 从数据库读取办学条件表信息
 */
function getSchoolCondition() {
    var arr = {
        params: ['param', 'param2']
    };
    $.ajax({
        type: 'POST',
        url: '/cityuser/getschoolcondition',
        data: {
            page: 0,
            size: 10,
            sort: 'modifyTime',
            sort: 'desc',
            req_type: req_type
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功
                // 渲染数据

                $('#audit_list').html("");
                var dataHtml = "";
                $.each(res.data.content, function (index, ele) {
                    dataHtml += "<div class='accordion-group'>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #9B9B9B;'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #EF7178;'>";
                    } else {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;'>";
                    }

                    dataHtml += "<div class='accordion-toggle collapsed' data-parent='#notice_list' data-toggle='collapse' href='#pane_" + index + "'>" +
                        "<span style='width:50%;font-size:18px;'><img class='img-circle' src='../img/psb.jpg' style='width:30px;'>" +
                        "<b id='school_name'>" + ele.schoolBasic.schoolName + "</b>" +
                        "<br>办学条件</span>" +
                        "<span style='font-size:18px;'><a style='float:right; margin-left:5%;'>查看更多▼</a>" +
                        "<span style='float:right;'>" + ele.modifyTime + "</span></span></div></div>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-body collapse undo-accordion-body' id='pane_" + index + "'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-body collapse nopass-accordion-body' id='pane_" + index + "'>";
                    } else {
                        dataHtml += "<div class='accordion-body collapse pass-accordion-body' id='pane_" + index + "'>";
                    }
                    dataHtml += "<div class='accordion-inner'>" +
                        "<table cellpadding='3' class='table table-striped' style='width:100%;'>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>办学条件表编号</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.conditionId + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>学生用餐座位数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.diningSeatCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>图书馆藏书数量</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.bookCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>电子读物数量</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.electronicBookCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>报纸订阅数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.newspaperSubscriptionCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>期刊订阅数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.journalSubscriptionCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>阅览室座位数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.readingroomSeatCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>电子阅览室座位数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.electronicReadingroomSeatCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>教师用台式机数量</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.desktopCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>教师用笔记本数量</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.notebookCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>地方生均预算内拨款标准</td>" +
                        "<td style='width:50%;text-align:right;'>" + "" + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>地方财政专项拨款</td>" +
                        "<td style='width:50%;text-align:right;'>" + "" + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>负债总额</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.totalLiabilitie + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>货款总额</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.totalPayment + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>教学仪器设备总值</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.educationalDeviceValue + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>教学仪器设备总量</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.educationalDeviceCount + "</td></tr></table>" +
                        "<hr />";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div data-id='" + ele.conditionId + "'><button class='btn btn-large btn-primary audit-btn' onclick='passSbs(this)'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' onclick='rejectSbs(this)'>驳回</button></div></div></div></div>";
                    } else {
                        dataHtml += "<div><button class='btn btn-large btn-primary audit-btn' disabled='disabled'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' disabled='disabled'>驳回</button></div></div></div></div>";
                    }
                });
                $('#audit_list').html(dataHtml);

                $('#pagination').jqPaginator('option', {
                    totalPages: res.data.totalPages
                });

            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

// 审核通过办学条件
function passSc(ele) {
    var sc_id = $(ele).parent().attr('data-id');
    $.ajax({
        type: 'POST',
        url: '/cityuser/passschoolcondition',
        data: {
            conditionId: sc_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "black");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse pass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).next().attr("disabled", true);

            } else {
                alert(res.msg);
                return;
            }

        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });

}

//审核不通过办学条件
function rejectSc(ele) {
    var sc_id = $(ele).parent().attr('data-id');

    $.ajax({
        type: 'POST',
        url: '/cityuser/rejectschoolcondition',
        data: {
            conditionId: sc_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "#EF7178");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse nopass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).prev().attr("disabled", true);

            } else {
                alert(res.msg);
                return;
            }

        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });

}

/*
 * 从数据库读取专业与课程建设表信息
 */
function getMGCC() {
    $.ajax({
        type: 'POST',
        url: '/cityuser/getmajorgradecourseconstruction',
        data: {
            page: 0,
            size: 10,
            sort: 'modifyTime',
            sort: 'desc',
            req_type: req_type
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功
                // 渲染数据

                $('#audit_list').html("");
                var dataHtml = "";
                $.each(res.data.content, function (index, ele) {
                    dataHtml += "<div class='accordion-group'>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #9B9B9B;'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #EF7178;'>";
                    } else {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;'>";
                    }
                    dataHtml += "<div class='accordion-toggle collapsed' data-parent='#notice_list' data-toggle='collapse' href='#pane_" + index + "'>" +
                        "<span style='width:50%;font-size:18px;'><img class='img-circle' src='../img/psb.jpg' style='width:30px;'>" +
                        "<b id='school_name'>" + ele.schoolBasic.schoolName + "</b>" +
                        "<br>专业与课程建设</span>" +
                        "<span style='font-size:18px;'><a style='float:right; margin-left:5%;'>查看更多▼</a>" +
                        "<span style='float:right;'>" + ele.modifyTime + "</span></span></div></div>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-body collapse undo-accordion-body' id='pane_" + index + "'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-body collapse nopass-accordion-body' id='pane_" + index + "'>";
                    } else {
                        dataHtml += "<div class='accordion-body collapse pass-accordion-body' id='pane_" + index + "'>";
                    }
                    dataHtml += "<div class='accordion-inner'>" +
                        "<table cellpadding='3' class='table table-striped' style='width:100%;'>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>专业与课程建设表编号</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.constructionId + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>专业大类数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorCategoriesCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>专业大类名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorCategoriesNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>专业数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>专业名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>专业方向数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorDirectionCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>专业方向名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorDirectionNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>省部级以上示范重点专业数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.aboveProviceKeyMajorCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>省部级以上示范重点专业名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.aboveProviceKeyMajorNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>省部级以上示范骨干专业数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.aboveProviceCoreMajorCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>省部级以上示范骨干专业名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.aboveProviceCoreMajorNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>省部级以上示范特色专业数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.aboveProviceSpecialMajorCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>省部级以上示范特色专业名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.aboveProviceSpecialMajorNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>学校开展技能大赛的专业数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.skillCompetetionMajorCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>学校开展技能大赛的专业名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.skillCompetetionMajorNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>实现项目教学的专业课程数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.projectTeachingCourseCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>实现项目教学的专业课程名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.projectTeachingCourseNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>企业参与开发的专业课程数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.companyJoinDevelopmentCourseCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>企业参与开发的专业课程名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.companyJoinDevelopmentCourseNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>校本教材数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.textbookCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>校本教材名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.textbookNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>教师主编并公开出版的教材数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.teacherTextbookCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>教师主编并公开出版的教材相关详细信息列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.teacherTextbookDetailList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>牵头开发国家共建共享计划课程数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.nccsPlanLeadCourseCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>牵头开发国家共建共享计划课程相关详细信息列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.nccsPlanLeadCourseDetailList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>参与开发国家共建共享课程数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.nccsPlanJoinCourseCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>参与开发国家共建共享课程相关详细信息列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.nccsPlanJoinCourseDetailList + "</td></tr></table>" +
                        "<hr />";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div data-id='" + ele.constructionId + "'><button class='btn btn-large btn-primary audit-btn' onclick='passSbs(this)'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' onclick='rejectSbs(this)'>驳回</button></div></div></div></div>";
                    } else {
                        dataHtml += "<div><button class='btn btn-large btn-primary audit-btn' disabled='disabled'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' disabled='disabled'>驳回</button></div></div></div></div>";
                    }
                });
                $('#audit_list').html(dataHtml);

                $('#pagination').jqPaginator('option', {
                    totalPages: res.data.totalPages
                });

            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

// 审核通过专业与课程建设
function passMGCC(ele) {
    var mgcc_id = $(ele).parent().attr('data-id');
    $.ajax({
        type: 'POST',
        url: '/cityuser/passmajorgradecourseconstruction',
        data: {
            constructionId: mgcc_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "black");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse pass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).next().attr("disabled", true);

            } else {
                alert(res.msg);
                return;
            }

        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });

}

//审核不通过专业与课程建设
function rejectMGCC(ele) {
    var mgcc_id = $(ele).parent().attr('data-id');

    $.ajax({
        type: 'POST',
        url: '/cityuser/rejectmajorgradecourseconstruction',
        data: {
            constructionId: mgcc_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "#EF7178");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse nopass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).prev().attr("disabled", true);

            } else {
                alert(res.msg);
                return;
            }

        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/*
 * 从数据库读取参与职教集团情况表信息
 */
function getVEG() {
    $.ajax({
        type: 'POST',
        url: '/cityuser/getvocationaleducationalgroup',
        data: {
            page: 0,
            size: 10,
            sort: 'modifyTime',
            sort: 'desc',
            req_type: req_type
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功,渲染数据
                $('#audit_list').html("");
                var dataHtml = "";
                $.each(res.data.content, function (index, ele) {
                    dataHtml += "<div class='accordion-group'>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #9B9B9B;'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #EF7178;'>";
                    } else {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;'>";
                    }
                    dataHtml += "<div class='accordion-toggle collapsed' data-parent='#notice_list' data-toggle='collapse' href='#pane_" + index + "'>" +
                        "<span style='width:50%;font-size:18px;'><img class='img-circle' src='../img/psb.jpg' style='width:30px;'>" +
                        "<b id='school_name'>" + ele.schoolBasic.schoolName + "</b>" +
                        "<br>参与职教集团情况</span>" +
                        "<span style='font-size:18px;'><a style='float:right; margin-left:5%;'>查看更多▼</a>" +
                        "<span style='float:right;'>" + ele.modifyTime + "</span></span></div></div>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-body collapse undo-accordion-body' id='pane_" + index + "'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-body collapse nopass-accordion-body' id='pane_" + index + "'>";
                    } else {
                        dataHtml += "<div class='accordion-body collapse pass-accordion-body' id='pane_" + index + "'>";
                    }
                    dataHtml += "<div class='accordion-inner'>" +
                        "<table cellpadding='3' class='table table-striped' style='width:100%;'>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>参与职教集团情况表编号</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.educationalGroupId + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>本校牵头组织的职教集团数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.leadEducationalGroupCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>本校牵头组织的职教集团名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.leadEducationalGroupNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>参加本校牵头的职教集团企业数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.leadEducationalGroupJoinCompanyCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>参加本校牵头的职教集团企业名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.leadEducationalGroupJoinCompanyNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>参加本校牵头的职教集团学校数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.leadEducationalGroupJoinSchoolCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>参加本校牵头的职教集团学校名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.leadEducationalGroupJoinSchoolNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>参加本校牵头的职教集团的专业数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.leadEducationalGroupJoinMajorCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>参加本校牵头的职教集团的专业名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.leadEducationalGroupJoinMajorNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>本校参与的职教集团数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.joinEducationalGroupCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>本校参与的职教集团数及名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.joinEducationalGroupNameList + "</td></tr></table>" +
                        "<hr />";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div data-id='" + ele.educationalGroupId + "'><button class='btn btn-large btn-primary audit-btn' onclick='passSbs(this)'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' onclick='rejectSbs(this)'>驳回</button></div></div></div></div>";
                    } else {
                        dataHtml += "<div><button class='btn btn-large btn-primary audit-btn' disabled='disabled'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' disabled='disabled'>驳回</button></div></div></div></div>";
                    }
                });
                $('#audit_list').html(dataHtml);
                $('#pagination').jqPaginator('option', {
                    totalPages: res.data.totalPages
                });
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

// 审核通过参与职教集团情况
function passVEG(ele) {
    var veg_id = $(ele).parent().attr('data-id');
    $.ajax({
        type: 'POST',
        url: '/cityuser/passvocationaleducationalgroup',
        data: {
            constructionId: veg_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "black");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse pass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).next().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

//审核不通过参与职教集团情况
function rejectVEG(ele) {
    var veg_id = $(ele).parent().attr('data-id');

    $.ajax({
        type: 'POST',
        url: '/cityuser/rejectvocationaleducationalgroup',
        data: {
            constructionId: veg_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "#EF7178");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse nopass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).prev().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/*
 * 从数据库读取国际合作表信息
 */
function getGlobalCooperation() {
    $.ajax({
        type: 'POST',
        url: '/cityuser/getglobalcooperation',
        data: {
            page: 0,
            size: 10,
            sort: 'modifyTime',
            sort: 'desc',
            req_type: req_type
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功,渲染数据
                $('#audit_list').html("");
                var dataHtml = "";
                $.each(res.data.content, function (index, ele) {
                    dataHtml += "<div class='accordion-group'>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #9B9B9B;'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #EF7178;'>";
                    } else {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;'>";
                    }
                    dataHtml += "<div class='accordion-toggle collapsed' data-parent='#notice_list' data-toggle='collapse' href='#pane_" + index + "'>" +
                        "<span style='width:50%;font-size:18px;'><img class='img-circle' src='../img/psb.jpg' style='width:30px;'>" +
                        "<b id='school_name'>" + ele.schoolBasic.schoolName + "</b>" +
                        "<br>国际合作</span>" +
                        "<span style='font-size:18px;'><a style='float:right; margin-left:5%;'>查看更多▼</a>" +
                        "<span style='float:right;'>" + ele.modifyTime + "</span></span></div></div>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-body collapse undo-accordion-body' id='pane_" + index + "'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-body collapse nopass-accordion-body' id='pane_" + index + "'>";
                    } else {
                        dataHtml += "<div class='accordion-body collapse pass-accordion-body' id='pane_" + index + "'>";
                    }
                    dataHtml += "<div class='accordion-inner'>" +
                        "<table cellpadding='3' class='table table-striped' style='width:100%;'>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>国际合作表编号</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.globalCooperationId + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>合作专业数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.globalCooperationMajorCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>合作专业名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.globalCooperationMajorNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>合作课程数及</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.globalCooperationCourseCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>合作课程名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.globalCooperationCourseNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>培养学生数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.globalCooperationTrainingStudentCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>开发教材数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.globalCooperationTextbookCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>开发教材名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.globalCooperationTextbookNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>国际技能大赛获奖数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.globalSkillCompetetionAwardCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>国际技能大赛获奖名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.globalSkillCompetetionAwardNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>接收外籍学生数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.foreignStudentCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>出国就业学生数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.abroadEmploymentStudentCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>引进国外课程数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.foreignCourseCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>引进国外课程名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.foreignCourseNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>引进国际证书数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.globalCertificateCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>引进国际证书名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.globalCertificateNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>聘任外教数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.foreignTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>获得国际职业资格证书人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.globalProfessionalCertificatePersonCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>国际职业资格证书名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.globalProfessionalCertificateNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>参加国际技能大赛人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.joinSkillCompetetionPersonCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>国际技能大赛名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.skillCompetetionNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>签订合作办学协议数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.cooperationProtocolCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>送培教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.developTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>合作办学机构数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.cooperationOrginazationCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>合作办学机构名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.cooperationOrginazationNameList + "</td></tr></table>" +
                        "<hr />";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div data-id='" + ele.globalCooperationId + "'><button class='btn btn-large btn-primary audit-btn' onclick='passSbs(this)'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' onclick='rejectSbs(this)'>驳回</button></div></div></div></div>";
                    } else {
                        dataHtml += "<div><button class='btn btn-large btn-primary audit-btn' disabled='disabled'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' disabled='disabled'>驳回</button></div></div></div></div>";
                    }
                });
                $('#audit_list').html(dataHtml);
                $('#pagination').jqPaginator('option', {
                    totalPages: res.data.totalPages
                });
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

// 审核通过国际合作
function passGlobalCooperation(ele) {
    var gc_id = $(ele).parent().attr('data-id');
    $.ajax({
        type: 'POST',
        url: '/cityuser/passglobalcooperation',
        data: {
            constructionId: gc_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "black");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse pass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).next().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

//审核不通过国际合作
function rejectGlobalCooperation(ele) {
    var gc_id = $(ele).parent().attr('data-id');

    $.ajax({
        type: 'POST',
        url: '/cityuser/rejectglobalcooperation',
        data: {
            constructionId: gc_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "#EF7178");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse nopass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).prev().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/*
 * 从数据库读取校企合作表信息
 */
function getSCC() {
    $.ajax({
        type: 'POST',
        url: '/cityuser/getschoolcompanycooperation',
        data: {
            page: 0,
            size: 10,
            sort: 'modifyTime',
            sort: 'desc',
            req_type: req_type
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功,渲染数据
                $('#audit_list').html("");
                var dataHtml = "";
                $.each(res.data.content, function (index, ele) {
                    dataHtml += "<div class='accordion-group'>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #9B9B9B;'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #EF7178;'>";
                    } else {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;'>";
                    }
                    dataHtml += "<div class='accordion-toggle collapsed' data-parent='#notice_list' data-toggle='collapse' href='#pane_" + index + "'>" +
                        "<span style='width:50%;font-size:18px;'><img class='img-circle' src='../img/psb.jpg' style='width:30px;'>" +
                        "<b id='school_name'>" + ele.schoolBasic.schoolName + "</b>" +
                        "<br>校企合作</span>" +
                        "<span style='font-size:18px;'><a style='float:right; margin-left:5%;'>查看更多▼</a>" +
                        "<span style='float:right;'>" + ele.modifyTime + "</span></span></div></div>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-body collapse undo-accordion-body' id='pane_" + index + "'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-body collapse nopass-accordion-body' id='pane_" + index + "'>";
                    } else {
                        dataHtml += "<div class='accordion-body collapse pass-accordion-body' id='pane_" + index + "'>";
                    }
                    dataHtml += "<div class='accordion-inner'>" +
                        "<table cellpadding='3' class='table table-striped' style='width:100%;'>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>校企合作表编号</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.schoolCompanyCooperationDataId + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>校外实训基地数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.outsideTrainingbaseCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>校外实训基地名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.outsideTrainingbaseNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>签订合作协议的企业数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.cooperationCompanyCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>签订合作协议的企业名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.cooperationCompanyNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>签订合作协议的专业数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.globalCooperationMajorCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>签订合作协议的专业名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.cooperationMajorNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>合作企业参与教学的专业数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.companyJoinMajorCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>合作企业参与教学的专业名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.companyJoinMajorNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>合作企业参与教学教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.companyJoinTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>合作企业参与教学课时数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.companyJoinHoursCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>合作企业投入资金总额</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.companyInputAllMoney + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>合作企业投入到帐资金</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.companyInputReceiveMoney + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>合作企业投入设备总值</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.companyInputDeviceValue + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>合作企业接收实训学生数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.companyReceiveStudnetCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>合作企业接收学生顶岗实习学生数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.companyReceiveStudentInternshipCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>合作企业接收就业学生数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.companyReceiveStudentEmploymentCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>与企业共建研发中心数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.cooperationRdcenterCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>校外教师培训基地数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.outsideTeacherTrainingbaseCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>生产性实训基地产值</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.productiveTrainingbaseOutputValue + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>校企合作订单班人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.cooperationClassPersonCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>现代学徒制培养人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.modernApprenticeshipPersonCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>校企合作开发课程数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.cooperationClassCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>校企合作开发课程名称列表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.cooperationClassNameList + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>教师进企业人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.toCompanyTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>学校每学期通过政府购买方式聘请企业人员任教总人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.employCompanyPersonCount + "</td></tr></table>" +
                        "<hr />";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div data-id='" + ele.schoolCompanyCooperationDataId + "'><button class='btn btn-large btn-primary audit-btn' onclick='passSbs(this)'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' onclick='rejectSbs(this)'>驳回</button></div></div></div></div>";
                    } else {
                        dataHtml += "<div><button class='btn btn-large btn-primary audit-btn' disabled='disabled'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' disabled='disabled'>驳回</button></div></div></div></div>";
                    }
                });
                $('#audit_list').html(dataHtml);
                $('#pagination').jqPaginator('option', {
                    totalPages: res.data.totalPages
                });
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

// 审核通过校企合作
function passSCC(ele) {
    var scc_id = $(ele).parent().attr('data-id');
    $.ajax({
        type: 'POST',
        url: '/cityuser/passschoolcompanycooperation',
        data: {
            constructionId: scc_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "black");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse pass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).next().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

//审核不通过校企合作
function rejectSCC(ele) {
    var scc_id = $(ele).parent().attr('data-id');

    $.ajax({
        type: 'POST',
        url: '/cityuser/rejectschoolcompanycooperation',
        data: {
            constructionId: scc_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "#EF7178");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse nopass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).prev().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/*
 * 从数据库读取教师基本情况表信息
 */
function getTeacherBasicSituation() {
    $.ajax({
        type: 'POST',
        url: '/cityuser/getteacherbasicsituation',
        data: {
            page: 0,
            size: 10,
            sort: 'modifyTime',
            sort: 'desc',
            req_type: req_type
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功,渲染数据
                $('#audit_list').html("");
                var dataHtml = "";
                $.each(res.data.content, function (index, ele) {
                    dataHtml += "<div class='accordion-group'>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #9B9B9B;'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #EF7178;'>";
                    } else {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;'>";
                    }
                    dataHtml += "<div class='accordion-toggle collapsed' data-parent='#notice_list' data-toggle='collapse' href='#pane_" + index + "'>" +
                        "<span style='width:50%;font-size:18px;'><img class='img-circle' src='../img/psb.jpg' style='width:30px;'>" +
                        "<b id='school_name'>" + ele.schoolBasic.schoolName + "</b>" +
                        "<br>教师基本情况</span>" +
                        "<span style='font-size:18px;'><a style='float:right; margin-left:5%;'>查看更多▼</a>" +
                        "<span style='float:right;'>" + ele.modifyTime + "</span></span></div></div>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-body collapse undo-accordion-body' id='pane_" + index + "'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-body collapse nopass-accordion-body' id='pane_" + index + "'>";
                    } else {
                        dataHtml += "<div class='accordion-body collapse pass-accordion-body' id='pane_" + index + "'>";
                    }
                    dataHtml += "<div class='accordion-inner'>" +
                        "<table cellpadding='3' class='table table-striped' style='width:100%;'>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>教师基本情况表编号</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.teacherBasicSituationId + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>在编在职教职工数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.servicingStaffCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>教职工编制数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.facultyStaffCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>专任教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.regularTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>外聘教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.foreignTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>心理咨询教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.counselingTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>男教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.maleTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>女教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.femaleTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>文化课教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.cultureTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>专业课教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>正高职称教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.mainHighTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>副高职称教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.deputyHighTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>中级职称教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.intermediateTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>初级职称教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.primaryTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>教坛新秀教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.rookieTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>专业学科带头人教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.professionalSubjectLeaderCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>市优青教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.cityOutstandYoungTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>市特级教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.citySpecialTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>省特级教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.provincialSpecialTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>双师型教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.doubleTypeTeacherCount + "</td></tr></table>" +
                        "<hr />";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div data-id='" + ele.teacherBasicSituationId + "'><button class='btn btn-large btn-primary audit-btn' onclick='passSbs(this)'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' onclick='rejectSbs(this)'>驳回</button></div></div></div></div>";
                    } else {
                        dataHtml += "<div><button class='btn btn-large btn-primary audit-btn' disabled='disabled'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' disabled='disabled'>驳回</button></div></div></div></div>";
                    }
                });
                $('#audit_list').html(dataHtml);
                $('#pagination').jqPaginator('option', {
                    totalPages: res.data.totalPages
                });
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

// 审核通过教师基本情况
function passTeacherBasicSituation(ele) {
    var tbs_id = $(ele).parent().attr('data-id');
    $.ajax({
        type: 'POST',
        url: '/cityuser/passteacherbasicsituation',
        data: {
            constructionId: tbs_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "black");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse pass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).next().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

//审核不通过教师基本情况
function rejectTeacherBasicSituation(ele) {
    var tbs_id = $(ele).parent().attr('data-id');

    $.ajax({
        type: 'POST',
        url: '/cityuser/rejectteacherbasicsituation',
        data: {
            constructionId: tbs_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "#EF7178");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse nopass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).prev().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/*
 * 从数据库读取公共课教师情况表信息
 */
function getPCTS() {
    $.ajax({
        type: 'POST',
        url: '/cityuser/getpubliccourseteachersituation',
        data: {
            page: 0,
            size: 10,
            sort: 'modifyTime',
            sort: 'desc',
            req_type: req_type
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功,渲染数据
                $('#audit_list').html("");
                var dataHtml = "";
                $.each(res.data.content, function (index, ele) {
                    dataHtml += "<div class='accordion-group'>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #9B9B9B;'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #EF7178;'>";
                    } else {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;'>";
                    }
                    dataHtml += "<div class='accordion-toggle collapsed' data-parent='#notice_list' data-toggle='collapse' href='#pane_" + index + "'>" +
                        "<span style='width:50%;font-size:18px;'><img class='img-circle' src='../img/psb.jpg' style='width:30px;'>" +
                        "<b id='school_name'>" + ele.schoolBasic.schoolName + "</b>" +
                        "<br>公共课教师情况</span>" +
                        "<span style='font-size:18px;'><a style='float:right; margin-left:5%;'>查看更多▼</a>" +
                        "<span style='float:right;'>" + ele.modifyTime + "</span></span></div></div>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-body collapse undo-accordion-body' id='pane_" + index + "'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-body collapse nopass-accordion-body' id='pane_" + index + "'>";
                    } else {
                        dataHtml += "<div class='accordion-body collapse pass-accordion-body' id='pane_" + index + "'>";
                    }
                    dataHtml += "<div class='accordion-inner'>" +
                        "<table cellpadding='3' class='table table-striped' style='width:100%;'>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>公共课教师情况编号</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.publicCourseTeacherSituationId + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>语文教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.chineseTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>数学教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.mathTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>英语教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.englishTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>体育教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.physicalTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>德育教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.moralEducationalTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>普通话教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.mandarinTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>计算机应用教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.computerApplicationTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>各科具有高级职称教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.seniorTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>校级以上专业带头人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.schoolMajorLeaderCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>骨干教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.backboneTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>双师型教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.doubleTypeTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>本科及以上学历专业任教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.aboveUndergraduateTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>具有研究生学历或学位的专任教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.graduateTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>参加省级以下培训专任教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.belowProvinceTrainTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>参加省级以上培训专任教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.aboveProvinceTrainTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>参加国家级培训专任教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.nationalTainTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>参加国外培训专任教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.foreignTrainTeacherCount + "</td></tr></table>" +
                        "<hr />";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div data-id='" + ele.publicCourseTeacherSituationId + "'><button class='btn btn-large btn-primary audit-btn' onclick='passSbs(this)'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' onclick='rejectSbs(this)'>驳回</button></div></div></div></div>";
                    } else {
                        dataHtml += "<div><button class='btn btn-large btn-primary audit-btn' disabled='disabled'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' disabled='disabled'>驳回</button></div></div></div></div>";
                    }
                });
                $('#audit_list').html(dataHtml);
                $('#pagination').jqPaginator('option', {
                    totalPages: res.data.totalPages
                });
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

// 审核通过公共课教师情况
function passPCTS(ele) {
    var pcts_id = $(ele).parent().attr('data-id');
    $.ajax({
        type: 'POST',
        url: '/cityuser/passpubliccourseteachersituation',
        data: {
            constructionId: pcts_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "black");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse pass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).next().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

//审核不通过公共课教师情况
function rejectPCTS(ele) {
    var pcts_id = $(ele).parent().attr('data-id');

    $.ajax({
        type: 'POST',
        url: '/cityuser/rejectpubliccourseteachersituation',
        data: {
            constructionId: pcts_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "#EF7178");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse nopass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).prev().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/*
 * 从数据库读取专业大类教师情况表信息
 */
function getMTS() {
    $.ajax({
        type: 'POST',
        url: '/cityuser/getmajorteachersituation',
        data: {
            page: 0,
            size: 10,
            sort: 'modifyTime',
            sort: 'desc',
            req_type: req_type
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功,渲染数据
                $('#audit_list').html("");
                var dataHtml = "";
                $.each(res.data.content, function (index, ele) {
                    dataHtml += "<div class='accordion-group'>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #9B9B9B;'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #EF7178;'>";
                    } else {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;'>";
                    }
                    dataHtml += "<div class='accordion-toggle collapsed' data-parent='#notice_list' data-toggle='collapse' href='#pane_" + index + "'>" +
                        "<span style='width:50%;font-size:18px;'><img class='img-circle' src='../img/psb.jpg' style='width:30px;'>" +
                        "<b id='school_name'>" + ele.schoolBasic.schoolName + "</b>" +
                        "<br>专业大类教师情况</span>" +
                        "<span style='font-size:18px;'><a style='float:right; margin-left:5%;'>查看更多▼</a>" +
                        "<span style='float:right;'>" + ele.modifyTime + "</span></span></div></div>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-body collapse undo-accordion-body' id='pane_" + index + "'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-body collapse nopass-accordion-body' id='pane_" + index + "'>";
                    } else {
                        dataHtml += "<div class='accordion-body collapse pass-accordion-body' id='pane_" + index + "'>";
                    }
                    dataHtml += "<div class='accordion-inner'>" +
                        "<table cellpadding='3' class='table table-striped' style='width:100%;'>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>专业大类教师情况编号</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorTeacherStatuationId + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>专业名</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorName + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>各专业大类教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.teacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>中高职称数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.middleHighProfessionalTitleCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>校级以上专业带头人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorSchoolProfessionalLeaderCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>骨干教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorBackboneTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>双师型教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorDoubleTypeTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>本科及以上学历专业任教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorAboveUndergraduateTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>具有研究生学历或学位的专任教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorGraduateTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>参加省级以下培训专任教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorUnderProvinceTrainTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>参加省级以上培训专任教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorAboveProvinceTrainTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>参加国家级培训专任教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.nationalTrainTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>参加国外培训专任教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.foreignTrainTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>获得技师资格人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.techniciansQualifiedCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>教师下企业人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.teacherToEnterpriseCount + "</td></tr></table>" +
                        "<hr />";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div data-id='" + ele.majorTeacherStatuationId + "'><button class='btn btn-large btn-primary audit-btn' onclick='passSbs(this)'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' onclick='rejectSbs(this)'>驳回</button></div></div></div></div>";
                    } else {
                        dataHtml += "<div><button class='btn btn-large btn-primary audit-btn' disabled='disabled'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' disabled='disabled'>驳回</button></div></div></div></div>";
                    }
                });
                $('#audit_list').html(dataHtml);
                $('#pagination').jqPaginator('option', {
                    totalPages: res.data.totalPages
                });
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

// 审核通过专业大类教师情况
function passMTS(ele) {
    var mts_id = $(ele).parent().attr('data-id');
    $.ajax({
        type: 'POST',
        url: '/cityuser/passmajorteachersituation',
        data: {
            constructionId: mts_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "black");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse pass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).next().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

//审核不通过专业大类教师情况
function rejectMTS(ele) {
    var mts_id = $(ele).parent().attr('data-id');

    $.ajax({
        type: 'POST',
        url: '/cityuser/rejectmajorteachersituation',
        data: {
            constructionId: mts_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "#EF7178");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse nopass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).prev().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/*
 * 从数据库读取职业培训情况表信息
 */
function getVT() {
    $.ajax({
        type: 'POST',
        url: '/cityuser/getvocationaltraining',
        data: {
            page: 0,
            size: 10,
            sort: 'modifyTime',
            sort: 'desc',
            req_type: req_type
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功,渲染数据
                $('#audit_list').html("");
                var dataHtml = "";
                $.each(res.data.content, function (index, ele) {
                    dataHtml += "<div class='accordion-group'>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #9B9B9B;'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #EF7178;'>";
                    } else {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;'>";
                    }
                    dataHtml += "<div class='accordion-toggle collapsed' data-parent='#notice_list' data-toggle='collapse' href='#pane_" + index + "'>" +
                        "<span style='width:50%;font-size:18px;'><img class='img-circle' src='../img/psb.jpg' style='width:30px;'>" +
                        "<b id='school_name'>" + ele.schoolBasic.schoolName + "</b>" +
                        "<br>职业培训情况</span>" +
                        "<span style='font-size:18px;'><a style='float:right; margin-left:5%;'>查看更多▼</a>" +
                        "<span style='float:right;'>" + ele.modifyTime + "</span></span></div></div>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-body collapse undo-accordion-body' id='pane_" + index + "'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-body collapse nopass-accordion-body' id='pane_" + index + "'>";
                    } else {
                        dataHtml += "<div class='accordion-body collapse pass-accordion-body' id='pane_" + index + "'>";
                    }
                    dataHtml += "<div class='accordion-inner'>" +
                        "<table cellpadding='3' class='table table-striped' style='width:100%;'>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>职业培训情况编号</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.vocationalTrainingId + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>培训企业员工人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.trainingStaffCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>面向社区开放学校资源天数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.openSchoolDay + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>学校服务社区的人天数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.serviceDay + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>培训社区居民数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.trainingResidentCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>培训双师型教师数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.trainingDoubleTypeTeacherCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>农民转岗培训人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.farmerTransferCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>培训未升学初高中毕业生人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.trainingJuniorHighGraduateCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>培训未就业大学毕业生人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.trainingCollageGraduateCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>培训残疾人人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.trainingDisabledCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>培训失业人员人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.trainingUnemployeeCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>培训农民工人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.trainingFarmerCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>培训退役士兵人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.trainingRetiredSoldierCount + "</td></tr></table>" +
                        "<hr />";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div data-id='" + ele.vocationalTrainingId + "'><button class='btn btn-large btn-primary audit-btn' onclick='passSbs(this)'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' onclick='rejectSbs(this)'>驳回</button></div></div></div></div>";
                    } else {
                        dataHtml += "<div><button class='btn btn-large btn-primary audit-btn' disabled='disabled'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' disabled='disabled'>驳回</button></div></div></div></div>";
                    }
                });
                $('#audit_list').html(dataHtml);
                $('#pagination').jqPaginator('option', {
                    totalPages: res.data.totalPages
                });
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

// 审核通过职业培训情况
function passVT(ele) {
    var vt_id = $(ele).parent().attr('data-id');
    $.ajax({
        type: 'POST',
        url: '/cityuser/passvocationaltraining',
        data: {
            constructionId: vt_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "black");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse pass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).next().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

//审核不通过职业培训情况
function rejectVT(ele) {
    var vt_id = $(ele).parent().attr('data-id');

    $.ajax({
        type: 'POST',
        url: '/cityuser/rejectvocationaltraining',
        data: {
            constructionId: vt_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "#EF7178");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse nopass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).prev().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/*
 * 从数据库读取全校实训基地表信息
 */
function getWSTB() {
    $.ajax({
        type: 'POST',
        url: '/cityuser/getwholeschooltrainingbase',
        data: {
            page: 0,
            size: 10,
            sort: 'modifyTime',
            sort: 'desc',
            req_type: req_type
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功,渲染数据
                $('#audit_list').html("");
                var dataHtml = "";
                $.each(res.data.content, function (index, ele) {
                    dataHtml += "<div class='accordion-group'>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #9B9B9B;'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #EF7178;'>";
                    } else {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;'>";
                    }
                    dataHtml += "<div class='accordion-toggle collapsed' data-parent='#notice_list' data-toggle='collapse' href='#pane_" + index + "'>" +
                        "<span style='width:50%;font-size:18px;'><img class='img-circle' src='../img/psb.jpg' style='width:30px;'>" +
                        "<b id='school_name'>" + ele.schoolBasic.schoolName + "</b>" +
                        "<br>全校实训基地</span>" +
                        "<span style='font-size:18px;'><a style='float:right; margin-left:5%;'>查看更多▼</a>" +
                        "<span style='float:right;'>" + ele.modifyTime + "</span></span></div></div>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-body collapse undo-accordion-body' id='pane_" + index + "'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-body collapse nopass-accordion-body' id='pane_" + index + "'>";
                    } else {
                        dataHtml += "<div class='accordion-body collapse pass-accordion-body' id='pane_" + index + "'>";
                    }
                    dataHtml += "<div class='accordion-inner'>" +
                        "<table cellpadding='3' class='table table-striped' style='width:100%;'>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>全校实训基地编号</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.wholeSchoolTrainingbaseId + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>全校实训基地名字</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.wholeSchoolTrainingbaseName + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>实训室总数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.trainingroomCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>实训室内设施设备台套数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.trainingroomDeviceCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>工位数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.stationCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>使用率</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.usingRate + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>中央资金</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.centralFund + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>省资金</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.provinceFund + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>市资金</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.cityFund + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>区县资金</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.countryFund + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>自筹资金</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.selfFund + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>企业捐助资金</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.companyDonationFund + "</td></tr>";
                    if (ele.trainingRooms === undefined) {
                        $.each(ele.trainingRooms, function (index, elt) {
                            dataHtml += "<tr style='width:100%'><td style='width:50%;text-align:left;'>实训室ID</td>" +
                                "<td style='width:50%;text-align:right;'>" + elt.trainingRoomId + "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>实训室名称</td>" +
                                "<td style='width:50%;text-align:right;'>" + elt.trainingRoomName + "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>实训室设备列表</td>" +
                                "<td style='width:50%;text-align:right;'>" + elt.trainingRoomDeviceList + "</td></tr>";
                        });
                    }
                    dataHtml += "</table>" +
                        "<hr />";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div data-id='" + ele.wholeSchoolTrainingbaseId + "'><button class='btn btn-large btn-primary audit-btn' onclick='passSbs(this)'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' onclick='rejectSbs(this)'>驳回</button></div></div></div></div>";
                    } else {
                        dataHtml += "<div><button class='btn btn-large btn-primary audit-btn' disabled='disabled'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' disabled='disabled'>驳回</button></div></div></div></div>";
                    }
                });
                $('#audit_list').html(dataHtml);
                $('#pagination').jqPaginator('option', {
                    totalPages: res.data.totalPages
                });
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

// 审核通过全校实训基地
function passWSTB(ele) {
    var wstb_id = $(ele).parent().attr('data-id');
    $.ajax({
        type: 'POST',
        url: '/cityuser/passwholeschooltrainingbase',
        data: {
            constructionId: wstb_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "black");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse pass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).next().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

//审核不通过全校实训基地
function rejectWSTB(ele) {
    var wstb_id = $(ele).parent().attr('data-id');

    $.ajax({
        type: 'POST',
        url: '/cityuser/rejectwholeschooltrainingbase',
        data: {
            constructionId: wstb_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "#EF7178");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse nopass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).prev().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/*
 * 从数据库读取专业大类实训基地表信息
 */
function getMTB() {
    $.ajax({
        type: 'POST',
        url: '/cityuser/getmajortrainingbase',
        data: {
            page: 0,
            size: 10,
            sort: 'modifyTime',
            sort: 'desc',
            req_type: req_type
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功,渲染数据
                $('#audit_list').html("");
                var dataHtml = "";
                $.each(res.data.content, function (index, ele) {
                    dataHtml += "<div class='accordion-group'>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #9B9B9B;'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #EF7178;'>";
                    } else {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;'>";
                    }
                    dataHtml += "<div class='accordion-toggle collapsed' data-parent='#notice_list' data-toggle='collapse' href='#pane_" + index + "'>" +
                        "<span style='width:50%;font-size:18px;'><img class='img-circle' src='../img/psb.jpg' style='width:30px;'>" +
                        "<b id='school_name'>" + ele.schoolBasic.schoolName + "</b>" +
                        "<br>专业大类实训基地</span>" +
                        "<span style='font-size:18px;'><a style='float:right; margin-left:5%;'>查看更多▼</a>" +
                        "<span style='float:right;'>" + ele.modifyTime + "</span></span></div></div>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-body collapse undo-accordion-body' id='pane_" + index + "'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-body collapse nopass-accordion-body' id='pane_" + index + "'>";
                    } else {
                        dataHtml += "<div class='accordion-body collapse pass-accordion-body' id='pane_" + index + "'>";
                    }
                    dataHtml += "<div class='accordion-inner'>" +
                        "<table cellpadding='3' class='table table-striped' style='width:100%;'>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>专业大类实训基地编号</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorTrainingbaseId + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>专业大类实训基地名字</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorTrainingbaseName + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>实训室总数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorTrainingroomCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>实训室内设施设备台套数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorTrainingroomDeviceCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>工位数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorStationCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>中央资金</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorCentralFund + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>省资金</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorProvinceFund + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>市资金</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorCityFund + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>区县资金</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorCountryFund + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>自筹资金</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorSelfFund + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>企业捐助资金</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorCompanyDonationFund + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>学生实训人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.globalCooperationTrainingStudentCount + "</td></tr>";
                    "<tr style='width:100%'><td style='width:50%;text-align:left;'>社会化培训实训人数</td>" +
                    "<td style='width:50%;text-align:right;'>" + ele.trainingSocializationCount + "</td></tr>";
                    "<tr style='width:100%'><td style='width:50%;text-align:left;'>专业</td>" +
                    "<td style='width:50%;text-align:right;'>" + ele.major + "</td></tr>";
                    if (ele.trainingRooms === undefined) {
                        $.each(ele.trainingRooms, function (index, elt) {
                            dataHtml += "<tr style='width:100%'><td style='width:50%;text-align:left;'>实训室ID</td>" +
                                "<td style='width:50%;text-align:right;'>" + elt.trainingRoomId + "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>实训室名称</td>" +
                                "<td style='width:50%;text-align:right;'>" + elt.trainingRoomName + "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>实训室设备列表</td>" +
                                "<td style='width:50%;text-align:right;'>" + elt.trainingRoomDeviceList + "</td></tr>";
                        });
                    }
                    dataHtml += "</table>" +
                        "<hr />";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div data-id='" + ele.majorTrainingbaseId + "'><button class='btn btn-large btn-primary audit-btn' onclick='passSbs(this)'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' onclick='rejectSbs(this)'>驳回</button></div></div></div></div>";
                    } else {
                        dataHtml += "<div><button class='btn btn-large btn-primary audit-btn' disabled='disabled'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' disabled='disabled'>驳回</button></div></div></div></div>";
                    }
                });
                $('#audit_list').html(dataHtml);
                $('#pagination').jqPaginator('option', {
                    totalPages: res.data.totalPages
                });
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

// 审核通过专业大类实训基地
function passMTB(ele) {
    var mtb_id = $(ele).parent().attr('data-id');
    $.ajax({
        type: 'POST',
        url: '/cityuser/passmajortrainingbase',
        data: {
            constructionId: mtb_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "black");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse pass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).next().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

//审核不通过专业大类实训基地
function rejectMTB(ele) {
    var mtb_id = $(ele).parent().attr('data-id');

    $.ajax({
        type: 'POST',
        url: '/cityuser/rejectmajortrainingbase',
        data: {
            constructionId: mtb_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "#EF7178");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse nopass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).prev().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/*
 * 从数据库读取公用实训基地表信息
 */
function getPTB() {
    $.ajax({
        type: 'POST',
        url: '/cityuser/getpublictrainingbase',
        data: {
            page: 0,
            size: 10,
            sort: 'modifyTime',
            sort: 'desc',
            req_type: req_type
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功,渲染数据
                $('#audit_list').html("");
                var dataHtml = "";
                $.each(res.data.content, function (index, ele) {
                    dataHtml += "<div class='accordion-group'>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #9B9B9B;'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #EF7178;'>";
                    } else {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;'>";
                    }
                    dataHtml += "<div class='accordion-toggle collapsed' data-parent='#notice_list' data-toggle='collapse' href='#pane_" + index + "'>" +
                        "<span style='width:50%;font-size:18px;'><img class='img-circle' src='../img/psb.jpg' style='width:30px;'>" +
                        "<b id='school_name'>" + ele.schoolBasic.schoolName + "</b>" +
                        "<br>公用实训基地</span>" +
                        "<span style='font-size:18px;'><a style='float:right; margin-left:5%;'>查看更多▼</a>" +
                        "<span style='float:right;'>" + ele.modifyTime + "</span></span></div></div>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-body collapse undo-accordion-body' id='pane_" + index + "'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-body collapse nopass-accordion-body' id='pane_" + index + "'>";
                    } else {
                        dataHtml += "<div class='accordion-body collapse pass-accordion-body' id='pane_" + index + "'>";
                    }
                    dataHtml += "<div class='accordion-inner'>" +
                        "<table cellpadding='3' class='table table-striped' style='width:100%;'>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>公用实训基地编号</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.publicTrainingbaseId + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>公用实训基地名字</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.publicTrainingbaseName + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>实训室总数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.publicTrainingbaseRoomCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>对外开放课程名称</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.openingCourseName + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>课程数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.courseCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>课时数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.courseHourCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>耗材金额数（万元）</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.consumablesMoney + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>接受外来学校学生实训人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.receiveOutsideSchoolStudentCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>接受外来学校学生实训耗材金额数（万元）</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.receiveOutsideSchoolConsumalbesMoney + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>接受本校学生实训人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.receiveInsideSchoolStudentCount + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>接受本校学生实训实训耗材金额数（万元）</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.receiveInsideSchoolConsumablesMoney + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>接受社会化培训实训人数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.receiveSocializationPersonCount + "</td></tr>";
                    "<tr style='width:100%'><td style='width:50%;text-align:left;'>接受社会化培训实训耗材金额数（万元）</td>" +
                    "<td style='width:50%;text-align:right;'>" + ele.receiveSocializationConsumablesMoney + "</td></tr>";
                    if (ele.trainingRooms === undefined) {
                        $.each(ele.trainingRooms, function (index, elt) {
                            dataHtml += "<tr style='width:100%'><td style='width:50%;text-align:left;'>实训室ID</td>" +
                                "<td style='width:50%;text-align:right;'>" + elt.trainingRoomId + "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>实训室名称</td>" +
                                "<td style='width:50%;text-align:right;'>" + elt.trainingRoomName + "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>实训室设备列表</td>" +
                                "<td style='width:50%;text-align:right;'>" + elt.trainingRoomDeviceList + "</td></tr>";
                        });
                    }
                    dataHtml += "</table>" +
                        "<hr />";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div data-id='" + ele.publicTrainingbaseId + "'><button class='btn btn-large btn-primary audit-btn' onclick='passSbs(this)'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' onclick='rejectSbs(this)'>驳回</button></div></div></div></div>";
                    } else {
                        dataHtml += "<div><button class='btn btn-large btn-primary audit-btn' disabled='disabled'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' disabled='disabled'>驳回</button></div></div></div></div>";
                    }
                });
                $('#audit_list').html(dataHtml);
                $('#pagination').jqPaginator('option', {
                    totalPages: res.data.totalPages
                });
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

// 审核通过公用实训基地
function passPTB(ele) {
    var ptb_id = $(ele).parent().attr('data-id');
    $.ajax({
        type: 'POST',
        url: '/cityuser/passpublictrainingbase',
        data: {
            constructionId: ptb_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "black");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse pass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).next().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

//审核不通过公用实训基地
function rejectPTB(ele) {
    var ptb_id = $(ele).parent().attr('data-id');

    $.ajax({
        type: 'POST',
        url: '/cityuser/rejectpublictrainingbase',
        data: {
            constructionId: ptb_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "#EF7178");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse nopass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).prev().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/*
 * 从数据库读取教学计划基本情况表信息
 */
function getTPBS() {
    $.ajax({
        type: 'POST',
        url: '/cityuser/getteachplanbasicsituation',
        data: {
            page: 0,
            size: 10,
            sort: 'modifyTime',
            sort: 'desc',
            req_type: req_type
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功,渲染数据
                $('#audit_list').html("");
                var dataHtml = "";
                $.each(res.data.content, function (index, ele) {
                    dataHtml += "<div class='accordion-group'>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #9B9B9B;'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #EF7178;'>";
                    } else {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;'>";
                    }
                    dataHtml += "<div class='accordion-toggle collapsed' data-parent='#notice_list' data-toggle='collapse' href='#pane_" + index + "'>" +
                        "<span style='width:50%;font-size:18px;'><img class='img-circle' src='../img/psb.jpg' style='width:30px;'>" +
                        "<b id='school_name'>" + ele.schoolBasic.schoolName + "</b>" +
                        "<br>教学计划基本情况</span>" +
                        "<span style='font-size:18px;'><a style='float:right; margin-left:5%;'>查看更多▼</a>" +
                        "<span style='float:right;'>" + ele.modifyTime + "</span></span></div></div>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-body collapse undo-accordion-body' id='pane_" + index + "'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-body collapse nopass-accordion-body' id='pane_" + index + "'>";
                    } else {
                        dataHtml += "<div class='accordion-body collapse pass-accordion-body' id='pane_" + index + "'>";
                    }
                    dataHtml += "<div class='accordion-inner'>" +
                        "<table cellpadding='3' class='table table-striped' style='width:100%;'>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>教学计划基本情况编号</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.teachPlanBasicSituationId + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>专业教学计划</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.majorTeachingPlanFile + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>实施性教学计划课程表</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.teachingPlanScheduleFile + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>修订当期各专业各年级课程及课时数</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.reviseCourseFile + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>理论课程</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.theoreticalCourse + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>实训课程</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.trainingCourse + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>校外实训选择实训基地（万元）</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.outsideTrainingbaseName + "</td></tr>";
                    if (ele.trainingRooms === undefined) {
                        $.each(ele.trainingRooms, function (index, elt) {
                            dataHtml += "<tr style='width:100%'><td style='width:50%;text-align:left;'>实训室ID</td>" +
                                "<td style='width:50%;text-align:right;'>" + elt.trainingRoomId + "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>实训室名称</td>" +
                                "<td style='width:50%;text-align:right;'>" + elt.trainingRoomName + "</td></tr>" +
                                "<tr style='width:100%'><td style='width:50%;text-align:left;'>实训室设备列表</td>" +
                                "<td style='width:50%;text-align:right;'>" + elt.trainingRoomDeviceList + "</td></tr>";
                        });
                    }
                    dataHtml += "</table>" +
                        "<hr />";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div data-id='" + ele.teachPlanBasicSituationId + "'><button class='btn btn-large btn-primary audit-btn' onclick='passSbs(this)'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' onclick='rejectSbs(this)'>驳回</button></div></div></div></div>";
                    } else {
                        dataHtml += "<div><button class='btn btn-large btn-primary audit-btn' disabled='disabled'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' disabled='disabled'>驳回</button></div></div></div></div>";
                    }
                });
                $('#audit_list').html(dataHtml);
                $('#pagination').jqPaginator('option', {
                    totalPages: res.data.totalPages
                });
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

// 审核通过教学计划基本情况
function passTPBS(ele) {
    var tpbs_id = $(ele).parent().attr('data-id');
    $.ajax({
        type: 'POST',
        url: '/cityuser/passteachplanbasicsituation',
        data: {
            constructionId: tpbs_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "black");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse pass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).next().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

//审核不通过教学计划基本情况
function rejectTPBS(ele) {
    var tpbs_id = $(ele).parent().attr('data-id');

    $.ajax({
        type: 'POST',
        url: '/cityuser/rejectteachplanbasicsituation',
        data: {
            constructionId: tpbs_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "#EF7178");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse nopass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).prev().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/*
 * 从数据库读取项目申报表信息
 */
function getProjectDeclare() {
    $.ajax({
        type: 'POST',
        url: '/cityuser/getprojectdeclare',
        data: {
            page: 0,
            size: 10,
            sort: 'modifyTime',
            sort: 'desc',
            req_type: req_type
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                // 拉取成功,渲染数据
                $('#audit_list').html("");
                var dataHtml = "";
                $.each(res.data.content, function (index, ele) {
                    dataHtml += "<div class='accordion-group'>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #9B9B9B;'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;border-color: #EF7178;'>";
                    } else {
                        dataHtml += "<div class='accordion-heading list' style='border-style: solid solid solid solid;padding: 1% 1% 1% 1%;margin-bottom: 5px;'>";
                    }
                    dataHtml += "<div class='accordion-toggle collapsed' data-parent='#notice_list' data-toggle='collapse' href='#pane_" + index + "'>" +
                        "<span style='width:50%;font-size:18px;'><img class='img-circle' src='../img/psb.jpg' style='width:30px;'>" +
                        "<b id='school_name'>" + ele.schoolBasic.schoolName + "</b>" +
                        "<br>项目申报</span>" +
                        "<span style='font-size:18px;'><a style='float:right; margin-left:5%;'>查看更多▼</a>" +
                        "<span style='float:right;'>" + ele.modifyTime + "</span></span></div></div>";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div class='accordion-body collapse undo-accordion-body' id='pane_" + index + "'>";
                    } else if (ele.cityAuditStatus == -1) {
                        dataHtml += "<div class='accordion-body collapse nopass-accordion-body' id='pane_" + index + "'>";
                    } else {
                        dataHtml += "<div class='accordion-body collapse pass-accordion-body' id='pane_" + index + "'>";
                    }
                    dataHtml += "<div class='accordion-inner'>" +
                        "<table cellpadding='3' class='table table-striped' style='width:100%;'>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>项目申报编号</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.projectDeclareId + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>项目申报类型</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.projectDeclareType + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>项目名称</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.projectName + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>项目负责人</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.projectManager + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>项目简介</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.projectDescription + "</td></tr>" +
                        "<tr style='width:100%'><td style='width:50%;text-align:left;'>申报材料</td>" +
                        "<td style='width:50%;text-align:right;'>" + ele.projectFile + "</td></tr></table>" +
                        "<hr />";
                    if (ele.cityAuditStatus == 0) {
                        dataHtml += "<div data-id='" + ele.projectDeclareId + "'><button class='btn btn-large btn-primary audit-btn' onclick='passSbs(this)'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' onclick='rejectSbs(this)'>驳回</button></div></div></div></div>";
                    } else {
                        dataHtml += "<div><button class='btn btn-large btn-primary audit-btn' disabled='disabled'>通过</button>" +
                            "<button class='btn btn-large btn-warning audit-btn' disabled='disabled'>驳回</button></div></div></div></div>";
                    }
                });
                $('#audit_list').html(dataHtml);
                $('#pagination').jqPaginator('option', {
                    totalPages: res.data.totalPages
                });
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

// 审核通过项目申报
function passProjectDeclare(ele) {
    var pd_id = $(ele).parent().attr('data-id');
    $.ajax({
        type: 'POST',
        url: '/cityuser/passprojectdeclare',
        data: {
            constructionId: pd_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "black");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse pass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).next().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

//审核不通过项目申报
function rejectProjectDeclare(ele) {
    var pd_id = $(ele).parent().attr('data-id');

    $.ajax({
        type: 'POST',
        url: '/cityuser/rejectprojectdeclare',
        data: {
            constructionId: pd_id
        },
        dataType: 'json',
        traditional: true,
        success: function (res) {
            if (res.code == 200) {
                $(ele).parent().parent().parent().prev().css("border-color", "#EF7178");
                $(ele).parent().parent().parent().attr("class", "accordion-body collapse nopass-accordion-body");
                $(ele).attr("disabled", true);
                $(ele).prev().attr("disabled", true);
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/**
 * 加载分析系统界面
 */
function loadAnalysis() {
    $('#content1').load('./city_analysis.html');
    document.title = 'BEIS - 分析系统';
    // 菜单常亮
    $('#menu_1').attr("class", "dropdown");
    $('#menu_2').attr("class", "dropdown active");
    $('#menu_3').attr("class", "dropdown");
    getCounty();
}

/**
 * 分析系统：获取所有区县
 */
function getCounty() {
    $.ajax({
        type: 'GET',
        url: '/management/analysisdata/county/all',
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                var indexCounty = "";
                var moreCounty = "";
                $.each(res.data, function (index, elt) {
                    if (index < 3) {
                        // 放在外层
                        indexCounty += "<a class=\"btn\" data-selected=\"0\" data-county-id=\"" + elt.countyUserId + "\" onclick=\"clickCounty(this)\"\n" +
                            "                                      style=\"margin-right: 1%;margin-bottom:1%;\">" + elt.countyEdbName.toString().substring(0, elt.countyEdbName.toString().length - 3) + "</a>";
                    } else {
                        // 折叠
                        moreCounty += "<a class=\"btn\" data-selected=\"0\" data-county-id=\"" + elt.countyUserId + "\" onclick=\"clickCounty(this)\"\n" +
                            "                                      style=\"margin-right: 1%;margin-bottom:1%;\">" + elt.countyEdbName.toString().substring(0, elt.countyEdbName.toString().length - 3) + "</a>";
                    }
                    $('#indexCounty').html(indexCounty);
                    $('#moreCounty').html(moreCounty);
                })
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/**
 * 分析系统：获取区县关联学校
 */
function getSchool() {
    $.ajax({
        type: 'POST',
        url: '/management/analysisdata/schoolbasicinfor/city/county',
        data: {
            countyUserId : SelectedCounty
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                var indexSchool = "";
                var moreSchool = "";
                $.each(res.data, function (index, elt) {
                    if (index < 3) {
                        // 放在外层
                        indexSchool += "<a class=\"btn\" data-selected=\"0\" data-school-id=\"" + elt.schoolId + "\" onclick=\"clickSchool(this)\"\n" +
                            "                                      style=\"margin-right: 1%;margin-bottom:1%;\">" + elt.schoolName + "</a>";
                    } else {
                        // 折叠
                        moreSchool += "<a class=\"btn\" data-selected=\"0\" data-school-id=\"" + elt.schoolId + "\" onclick=\"clickSchool(this)\"\n" +
                            "                                      style=\"margin-right: 1%;margin-bottom:1%;\">" + elt.schoolName + "</a>";
                    }
                    $('#indexSchool').html(indexSchool);
                    $('#moreSchool').html(moreSchool);
                })
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/**
 * 选择区县或反选
 * @param areaBtn
 */
function clickCounty(countyBtn) {
    if ($(countyBtn).attr('data-selected') == '0') {
        $(countyBtn).attr('class', 'btn active');
        $(countyBtn).attr('style', 'margin-right: 1%;background-color:#EF7178;color:white;');
        $(countyBtn).attr('data-selected', '1');
        SelectedCounty = $(countyBtn).attr('data-county-id');
        $.each($('#indexSchool').children(), function (i, elt) {
            if (SelectedCounty != $(elt).attr('data-county-id')) {
                $(elt).attr('class', 'btn');
                $(elt).attr('style', 'margin-right: 1%;margin-bottom:1%;');
                $(elt).attr('data-selected', '0');
            }
        });
        $.each($('#moreCounty').children(), function (i, elt) {
            if (SelectedCounty != $(elt).attr('data-county-id')) {
                $(elt).attr('class', 'btn');
                $(elt).attr('style', 'margin-right: 1%;margin-bottom:1%;');
                $(elt).attr('data-selected', '0');
            }
        });
        getSchool();
    } else {
        $(countyBtn).attr('class', 'btn');
        $(countyBtn).attr('style', 'margin-right: 1%;margin-bottom:1%;');
        $(countyBtn).attr('data-selected', '0');
        SelectedCounty = null;
        SelectedSchool = null;

        $('#indexSchool').html("");
        $('#moreSchool').html("");
    }
}

/**
 * 点击更多区县按钮事件
 * @param ele
 */
function clickShowMoreCounty(ele) {
    if ($('#pane_county').attr('data-status') == '0') {
        $('#pane_county').attr('class', 'accordion-body in collapse');
        $('#pane_county').attr('data-status', '1');
        $(ele).html('折叠▲');
    } else {
        $('#pane_county').attr('class', 'accordion-body collapse');
        $('#pane_county').attr('data-status', '0');
        $(ele).html('更多区县▼');
    }
}

/**
 * 选择学校或反选
 * @param areaBtn
 */
function clickSchool(schoolBtn) {
    if ($(schoolBtn).attr('data-selected') == '0') {
        $(schoolBtn).attr('class', 'btn active');
        $(schoolBtn).attr('style', 'margin-right: 1%;background-color:#EF7178;color:white;');
        $(schoolBtn).attr('data-selected', '1');
        SelectedSchool = $(schoolBtn).attr('data-school-id');
        $.each($('#indexSchool').children(), function (i, elt) {
            if (SelectedSchool != $(elt).attr('data-school-id')) {
                $(elt).attr('class', 'btn');
                $(elt).attr('style', 'margin-right: 1%;margin-bottom:1%;');
                $(elt).attr('data-selected', '0');
            }
        });
        $.each($('#moreSchool').children(), function (i, elt) {
            if (SelectedSchool != $(elt).attr('data-school-id')) {
                $(elt).attr('class', 'btn');
                $(elt).attr('style', 'margin-right: 1%;margin-bottom:1%;');
                $(elt).attr('data-selected', '0');
            }
        });
        if (SelectedAnalysisType != null) {
            getAnalysisResult(SelectedAnalysisType);
        }

    } else {
        $(schoolBtn).attr('class', 'btn');
        $(schoolBtn).attr('style', 'margin-right: 1%;margin-bottom:1%;');
        $(schoolBtn).attr('data-selected', '0');
        SelectedSchool = null;
    }
}

/**
 * 点击更多学校按钮事件
 * @param ele
 */
function clickShowMoreSchool(ele) {
    if ($('#pane_school').attr('data-status') == '0') {
        $('#pane_school').attr('class', 'accordion-body in collapse');
        $('#pane_school').attr('data-status', '1');
        $(ele).html('折叠▲');
    } else {
        $('#pane_school').attr('class', 'accordion-body collapse');
        $('#pane_school').attr('data-status', '0');
        $(ele).html('更多学校▼');
    }
}

/**
 * 选择分析图表类型或反选
 * @param areaBtn
 */
function clickAnalysisType(typeBtn) {
    if ($(typeBtn).attr('data-selected') == '0') {
        $(typeBtn).attr('class', 'btn active');
        $(typeBtn).attr('style', 'margin-right: 1%;background-color:#EF7178;color:white;');
        $(typeBtn).attr('data-selected', '1');
        SelectedAnalysisType = $(typeBtn).attr('data-analysis-type');
        $.each($('#indexType').children(), function (i, elt) {
            if (SelectedAnalysisType != $(elt).attr('data-analysis-type')) {
                $(elt).attr('class', 'btn');
                $(elt).attr('style', 'margin-right: 1%;margin-bottom:1%;');
                $(elt).attr('data-selected', '0');
            }
        });
        if (SelectedSchool != null) {
            // 获取分析结果
            getAnalysisResult(SelectedAnalysisType);
        }
        $.each($('#moreType').children(), function (i, elt) {
            if (SelectedAnalysisType != $(elt).attr('data-analysis-type')) {
                $(elt).attr('class', 'btn');
                $(elt).attr('style', 'margin-right: 1%;margin-bottom:1%;');
                $(elt).attr('data-selected', '0');
            }
        });

    } else {
        $(typeBtn).attr('class', 'btn');
        $(typeBtn).attr('style', 'margin-right: 1%;margin-bottom:1%;');
        $(typeBtn).attr('data-selected', '0');
        SelectedAnalysisType = null;
    }
}

/**
 * 点击更多图表类型按钮事件
 * @param ele
 */
function clickShowMoreAnalysisType(ele) {
    if ($('#pane_analysisType').attr('data-status') == '0') {
        $('#pane_analysisType').attr('class', 'accordion-body in collapse');
        $('#pane_analysisType').attr('data-status', '1');
        $(ele).html('折叠▲');
    } else {
        $('#pane_analysisType').attr('class', 'accordion-body collapse');
        $('#pane_analysisType').attr('data-status', '0');
        $(ele).html('更多类型▼');
    }
}

/**
 * 获取分析结果
 * @param type
 */
function getAnalysisResult(type) {
    var url = "";
    switch (type) {
        case "1" :
            // 全校实训基地
            url = "/management/analysisdata/wholeschooltrainingbase";
            break;
        case "2" :
            // 专业大类实训基地
            break;
        case "3" :
            // 公共实训基地
            break;
        case "4":
        // 公用实训基地人数
        case"5":
            // 公用实训基地耗材
            url = "/management/analysisdata/publictrainingbase";
            break;
        case "6":
            // 项目申报
            break;
        case "7" :
            // 项目管理
            break;
        case "8" :
            // 办学条件
            break;
        case "9" :
            // 专业与课程设计
            break;
        case "10" :
            // 参与职教集团情况
            break;
        case "11" :
            // 国际合作情况
            break;
        case "12" :
            // 教师数据
            break;
        case "13" :
            // 学生基本情况
            break;
        case "14" :
            // 职业培训情况
            break;
        default:
            break;
    }
    $.ajax({
        type: 'POST',
        url: url,
        data: {
            schoolId: SelectedSchool
        },
        dataType: 'json',
        success: function (res) {
            if (res.code == 200) {
                // 获得结果
                switch (type) {
                    case "1" :
                        // 全校实训基地
                        dealWholeSchoolTrainingBaseResult(res.data);
                        break;
                    case "2" :
                        // 专业大类实训基地
                        break;
                    case "3" :
                        // 公共实训基地
                        break;
                    case "4":
                        // 公用实训基地人数
                        dealPublicTrainingBasePersonCountResult(res.data);
                        break;
                    case"5":
                        // 公用实训基地耗材
                        dealPublicTrainingBaseConsumableResult(res.data);
                        break;
                    case "6":
                        // 项目申报
                        break;
                    case "7" :
                        // 项目管理
                        break;
                    case "8" :
                        // 办学条件
                        break;
                    case "9" :
                        // 专业与课程设计
                        break;
                    case "10" :
                        // 参与职教集团情况
                        break;
                    case "11" :
                        // 国际合作情况
                        break;
                    case "12" :
                        // 教师数据
                        break;
                    case "13" :
                        // 学生基本情况
                        break;
                    case "14" :
                        // 职业培训情况
                        break;
                    default:
                        break;
                }
            } else {
                alert(res.msg);
                return;
            }
        },
        error: function () {
            alert('服务器异常');
            return;
        }
    });
}

/**
 * 分析图表：全校实训基地
 * @param data
 */
function dealWholeSchoolTrainingBaseResult(data) {
    var html = "<div align='center' style='text-align:center;'>" +
        "<div align='center' id='diagram' style='margin-top:1%;width:100%;height:500px;text-align:center;'></div></div>";
    $('#analysis_diagram').html(html);
    var myChart = echarts.init(document.getElementById('diagram'));

    var centralFund = new Array();  // 中央资金
    var provinceFund = new Array();  // 省资金
    var cityFund = new Array();  // 市资金
    var countyFund = new Array();  // 区县资金
    var selfFund = new Array();  // 自筹资金
    var companyFund = new Array();  // 企业捐助资金
    var modifyTime = new Array();

    $.each(data, function (i, elt) {
        var res_times = elt.modifyTime.toString().split("-");
        var time = res_times[0].substr(2, 4) + "-" + res_times[1];

        modifyTime.push(time);
        var total = parseInt(elt.centralFund) + parseInt(elt.cityFund) + parseInt(elt.countryFund) + parseInt(elt.selfFund) + parseInt(elt.companyDonationFund);

        centralFund.push((elt.centralFund / total * 100).toFixed(2));
        cityFund.push((elt.cityFund / total * 100).toFixed(2));
        countyFund.push((elt.countryFund / total * 100).toFixed(2));
        selfFund.push((elt.selfFund / total * 100).toFixed(2));
        companyFund.push((elt.companyDonationFund / total * 100).toFixed(2));
    });

    // 指定图表的配置项和数据
    var option = {
        // 标题
        title: {
            text: '全校实训基地资金投入占比情况',
            subtext: '数据来源：成都市教育局中职基础教育能力平台'
        },
        // 鼠标交互
        tooltip: {
            trigger: 'axis'
        },
        //图例名
        legend: {
            data: ['中央资金', '省资金', '市资金', '区县资金', '自筹资金', '企业捐助资金'],
            x: 300
        },
        grid: {
            left: '3%', //图表距边框的距离
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        //工具框，可以选择
        toolbox: {
            feature: {
                restore: {
                    show: true,
                    title: '还原'
                },
                dataView: {
                    show: true,
                    title: '数据视图',
                    readOnly: true,
                    lang: ['数据视图', '关闭', '刷新']
                },
                saveAsImage: {
                    show: true,
                    title: '保存图片'
                },
            }
        },
        //x轴信息样式
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: modifyTime,
            //坐标轴颜色
            axisLine: {
                lineStyle: {
                    color: '#EF7178'
                }
            },
            //x轴文字旋转
            axisLabel: {
                rotate: 30,
                interval: 0
            },
        },

        yAxis: [
            {
                type: 'value',
                axisLabel: {
                    formatter: '{value} %'
                }
            }
        ],
        series: [
            {
                name: '中央资金',
                type: 'line',
                symbol: 'circle', // 标志图形
                symbolSize: 4, //拐点圆的大小
                color: ['red'], //折线条的颜色
                data: centralFund,
                itemStyle: {
                    normal: {
                        lineStyle: {
                            width: 2,
                        }
                    }
                }
            },
            {
                name: '省资金',
                type: 'line',
                symbol: 'circle', // 标志图形
                symbolSize: 4, //拐点圆的大小
                color: ['blue'], //折线条的颜色
                data: provinceFund,
                itemStyle: {
                    normal: {
                        lineStyle: {
                            width: 2,
                        }
                    }
                }
            },
            {
                name: '市资金',
                type: 'line',
                symbol: 'circle', // 标志图形
                symbolSize: 4, //拐点圆的大小
                color: ['orange'], //折线条的颜色
                data: cityFund,
                itemStyle: {
                    normal: {
                        lineStyle: {
                            width: 2,
                        }
                    }
                }
            },
            {
                name: '区县资金',
                type: 'line',
                symbol: 'circle', // 标志图形
                symbolSize: 4, //拐点圆的大小
                color: ['green'], //折线条的颜色
                data: countyFund,
                itemStyle: {
                    normal: {
                        lineStyle: {
                            width: 2,
                        }
                    }
                }
            },
            {
                name: '自筹资金',
                type: 'line',
                symbol: 'circle', // 标志图形
                symbolSize: 4, //拐点圆的大小
                color: ['grey'], //折线条的颜色
                data: selfFund,
                itemStyle: {
                    normal: {
                        lineStyle: {
                            width: 2,
                        }
                    }
                }
            },
            {
                name: '企业捐助资金',
                type: 'line',
                symbol: 'circle', // 标志图形
                symbolSize: 4, //拐点圆的大小
                color: ['pink'], //折线条的颜色
                data: companyFund,
                itemStyle: {
                    normal: {
                        lineStyle: {
                            width: 2,
                        }
                    }
                }
            },

        ]
    };
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
}

/**
 * 分析图表：公用实训基地人数
 * @param data
 */
function dealPublicTrainingBasePersonCountResult(data) {
    var html = "<div align='center' style='text-align:center;'>" +
        "<div align='center' id='diagram' style='margin-top:1%;width:100%;height:500px;text-align:center;'></div></div>";
    $('#analysis_diagram').html(html);
    var myChart = echarts.init(document.getElementById('diagram'));

    // 指定图表的配置项和数据
    var option = {
        // 标题
        title: {
            text: '公用实训基地人数统计图表',
            subtext: '数据来源：成都市教育局中职基础教育能力平台',
            x: 'center'
        },
        // 鼠标交互
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        //图例名
        legend: {
            orient: 'vertical',
            left: 'left',
            data: ['社会化培训', '外来学校学生', '本校学生']
        },
        grid: {
            left: '3%', //图表距边框的距离
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        //工具框，可以选择
        toolbox: {
            feature: {
                restore: {
                    show: true,
                    title: '还原'
                },
                dataView: {
                    show: true,
                    title: '数据视图',
                    readOnly: true,
                    lang: ['数据视图', '关闭', '刷新']
                },
                saveAsImage: {
                    show: true,
                    title: '保存图片'
                },
            }
        },
        series: [
            {
                name: '实训人数',
                type: 'pie',
                radius: '55%',
                center: ['50%', '60%'],
                data: [
                    {value: parseInt(data.receiveSocializationPersonCount), name: '社会化培训'},
                    {value: parseInt(data.receiveOutsideSchoolStudentCount), name: '外来学校学生'},
                    {value: parseInt(data.receiveInsideSchoolStudentCount), name: '本校学生'}],
                itemStyle: {
                    emphasis: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }

        ]
    };
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
}

/**
 * 分析图表：公用实训基地耗材统计
 * @param data
 */
function dealPublicTrainingBaseConsumableResult(data) {
    var html = "<div align='center' style='text-align:center;'>" +
        "<div align='center' id='diagram' style='margin-top:1%;width:100%;height:500px;text-align:center;'></div></div>";
    $('#analysis_diagram').html(html);
    var myChart = echarts.init(document.getElementById('diagram'));

    // 指定图表的配置项和数据
    var option = {
        // 标题
        title: {
            text: '公用实训基地耗材统计图表',
            subtext: '数据来源：成都市教育局中职基础教育能力平台',
            x: 'center'
        },
        // 鼠标交互
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        //图例名
        legend: {
            orient: 'vertical',
            left: 'left',
            data: ['填报', '社会化培训', '外来学校学生', '本校学生']
        },
        grid: {
            left: '3%', //图表距边框的距离
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        //工具框，可以选择
        toolbox: {
            feature: {
                restore: {
                    show: true,
                    title: '还原'
                },
                dataView: {
                    show: true,
                    title: '数据视图',
                    readOnly: true,
                    lang: ['数据视图', '关闭', '刷新']
                },
                saveAsImage: {
                    show: true,
                    title: '保存图片'
                },
            }
        },
        series: [
            {
                name: '耗材金额',
                type: 'pie',
                radius: '55%',
                center: ['50%', '60%'],
                data: [
                    {value: parseFloat(data.consumablesMoney), name: '填报'},
                    {value: parseFloat(data.receiveSocializationConsumablesMoney), name: '社会化培训'},
                    {value: parseFloat(data.receiveOutsideSchoolConsumalbesMoney), name: '外来学校学生'},
                    {value: parseFloat(data.receiveInsideSchoolConsumablesMoney), name: '本校学生'}],
                itemStyle: {
                    emphasis: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
}